@powerlines/plugin-crypto 0.10.112 → 0.10.114
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/plugin-alloy/src/index.cjs +12 -5
- package/dist/plugin-alloy/src/index.mjs +12 -5
- package/dist/plugin-alloy/src/typescript/components/typescript-file.cjs +10 -8
- package/dist/plugin-alloy/src/typescript/components/typescript-file.mjs +10 -8
- package/dist/powerlines/src/internal/helpers/hooks.d.cts +47 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +49 -0
- package/dist/powerlines/src/types/api.d.cts +104 -0
- package/dist/powerlines/src/types/api.d.mts +104 -0
- package/dist/powerlines/src/types/build.d.cts +43 -3
- package/dist/powerlines/src/types/build.d.mts +42 -4
- package/dist/powerlines/src/types/config.d.cts +60 -4
- package/dist/powerlines/src/types/config.d.mts +60 -4
- package/dist/powerlines/src/types/context.d.cts +113 -1
- package/dist/powerlines/src/types/context.d.mts +113 -3
- package/dist/powerlines/src/types/hooks.d.cts +32 -0
- package/dist/powerlines/src/types/hooks.d.mts +32 -2
- package/dist/powerlines/src/types/plugin.d.cts +35 -61
- package/dist/powerlines/src/types/plugin.d.mts +35 -61
- package/dist/powerlines/src/types/resolved.d.cts +16 -4
- package/dist/powerlines/src/types/resolved.d.mts +16 -5
- package/dist/powerlines/src/types/unplugin.d.cts +22 -0
- package/dist/powerlines/src/types/unplugin.d.mts +23 -0
- package/package.json +5 -5
|
@@ -23,11 +23,18 @@ const plugin = (options = {}) => {
|
|
|
23
23
|
...options
|
|
24
24
|
},
|
|
25
25
|
build: {
|
|
26
|
-
inputOptions: { transform: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
inputOptions: { transform: {
|
|
27
|
+
typescript: {
|
|
28
|
+
jsxPragma: "Alloy.createElement",
|
|
29
|
+
jsxPragmaFrag: "Alloy.Fragment"
|
|
30
|
+
},
|
|
31
|
+
jsx: {
|
|
32
|
+
runtime: "classic",
|
|
33
|
+
pragma: "Alloy.createElement",
|
|
34
|
+
pragmaFrag: "Alloy.Fragment",
|
|
35
|
+
importSource: "@alloy-js/core"
|
|
36
|
+
}
|
|
37
|
+
} },
|
|
31
38
|
plugins: [(0, __alloy_js_rollup_plugin.default)()],
|
|
32
39
|
external: [
|
|
33
40
|
"@alloy-js/core",
|
|
@@ -21,11 +21,18 @@ const plugin = (options = {}) => {
|
|
|
21
21
|
...options
|
|
22
22
|
},
|
|
23
23
|
build: {
|
|
24
|
-
inputOptions: { transform: {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
inputOptions: { transform: {
|
|
25
|
+
typescript: {
|
|
26
|
+
jsxPragma: "Alloy.createElement",
|
|
27
|
+
jsxPragmaFrag: "Alloy.Fragment"
|
|
28
|
+
},
|
|
29
|
+
jsx: {
|
|
30
|
+
runtime: "classic",
|
|
31
|
+
pragma: "Alloy.createElement",
|
|
32
|
+
pragmaFrag: "Alloy.Fragment",
|
|
33
|
+
importSource: "@alloy-js/core"
|
|
34
|
+
}
|
|
35
|
+
} },
|
|
29
36
|
plugins: [alloy()],
|
|
30
37
|
external: [
|
|
31
38
|
"@alloy-js/core",
|
|
@@ -115,27 +115,29 @@ function TypescriptFileHeader(props) {
|
|
|
115
115
|
* @returns The rendered source file header.
|
|
116
116
|
*/
|
|
117
117
|
function TypescriptFileHeaderImports(props) {
|
|
118
|
-
const { imports } = props;
|
|
118
|
+
const { imports, builtinImports } = props;
|
|
119
119
|
const context = require_context.usePowerlines();
|
|
120
120
|
const sourceFile = (0, __alloy_js_typescript.useSourceFile)();
|
|
121
121
|
const scope = props.scope ?? sourceFile.scope;
|
|
122
122
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__alloy_js_core.Show, {
|
|
123
|
-
when: scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0,
|
|
123
|
+
when: scope.importedModules.size > 0 || !!builtinImports && Object.keys(builtinImports).length > 0 || !!imports && Object.keys(imports).length > 0,
|
|
124
124
|
children: [
|
|
125
125
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
|
|
126
126
|
when: !!imports && Object.keys(imports).length > 0,
|
|
127
127
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
|
|
128
128
|
each: Object.entries(imports ?? {}),
|
|
129
|
-
children: ([module$1,
|
|
130
|
-
if (module$1 === "$builtins") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
|
|
131
|
-
each: Object.entries(imported ?? {}),
|
|
132
|
-
children: ([builtinModule, builtinImports]) => __alloy_js_core.code`import ${builtinImports === null ? "" : ` from ${builtinImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (builtinImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && builtinImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (builtinImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${builtinImports.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${builtinModule.includes(":") ? builtinModule : `${context.config.output.builtinPrefix}:${builtinModule}`}";`
|
|
133
|
-
});
|
|
134
|
-
const normalImports = imported;
|
|
129
|
+
children: ([module$1, normalImports]) => {
|
|
135
130
|
return __alloy_js_core.code`import ${normalImports === null ? "" : ` from ${normalImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (normalImports.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && normalImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (normalImports.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${normalImports.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${module$1}";`;
|
|
136
131
|
}
|
|
137
132
|
})
|
|
138
133
|
}),
|
|
134
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
|
|
135
|
+
when: builtinImports && Object.keys(builtinImports).length > 0,
|
|
136
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.For, {
|
|
137
|
+
each: Object.entries(builtinImports ?? {}),
|
|
138
|
+
children: ([builtinModule, builtinImports$1]) => __alloy_js_core.code`import ${builtinImports$1 === null ? "" : ` from ${builtinImports$1.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (builtinImports$1.filter((i) => !(0, __stryke_type_checks_is_string.isString)(i) && i.default).length > 0 && builtinImports$1.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? ", " : "") + (builtinImports$1.filter((i) => (0, __stryke_type_checks_is_string.isString)(i) || !i.default).length > 0 ? `{ ${builtinImports$1.map((i) => (0, __stryke_type_checks_is_string.isString)(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${builtinModule.includes(":") ? builtinModule : `${context.config.output.builtinPrefix}:${builtinModule}`}";`
|
|
139
|
+
})
|
|
140
|
+
}),
|
|
139
141
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_core.Show, {
|
|
140
142
|
when: scope.importedModules.size > 0,
|
|
141
143
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__alloy_js_typescript.ImportStatements, { records: scope.importedModules })
|
|
@@ -114,27 +114,29 @@ function TypescriptFileHeader(props) {
|
|
|
114
114
|
* @returns The rendered source file header.
|
|
115
115
|
*/
|
|
116
116
|
function TypescriptFileHeaderImports(props) {
|
|
117
|
-
const { imports } = props;
|
|
117
|
+
const { imports, builtinImports } = props;
|
|
118
118
|
const context = usePowerlines();
|
|
119
119
|
const sourceFile = useSourceFile();
|
|
120
120
|
const scope = props.scope ?? sourceFile.scope;
|
|
121
121
|
return /* @__PURE__ */ jsxs(Show, {
|
|
122
|
-
when: scope.importedModules.size > 0 || !!imports && Object.keys(imports).length > 0,
|
|
122
|
+
when: scope.importedModules.size > 0 || !!builtinImports && Object.keys(builtinImports).length > 0 || !!imports && Object.keys(imports).length > 0,
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ jsx(Show, {
|
|
125
125
|
when: !!imports && Object.keys(imports).length > 0,
|
|
126
126
|
children: /* @__PURE__ */ jsx(For, {
|
|
127
127
|
each: Object.entries(imports ?? {}),
|
|
128
|
-
children: ([module,
|
|
129
|
-
if (module === "$builtins") return /* @__PURE__ */ jsx(For, {
|
|
130
|
-
each: Object.entries(imported ?? {}),
|
|
131
|
-
children: ([builtinModule, builtinImports]) => code`import ${builtinImports === null ? "" : ` from ${builtinImports.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (builtinImports.filter((i) => !isString(i) && i.default).length > 0 && builtinImports.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (builtinImports.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${builtinImports.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${builtinModule.includes(":") ? builtinModule : `${context.config.output.builtinPrefix}:${builtinModule}`}";`
|
|
132
|
-
});
|
|
133
|
-
const normalImports = imported;
|
|
128
|
+
children: ([module, normalImports]) => {
|
|
134
129
|
return code`import ${normalImports === null ? "" : ` from ${normalImports.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (normalImports.filter((i) => !isString(i) && i.default).length > 0 && normalImports.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (normalImports.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${normalImports.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${module}";`;
|
|
135
130
|
}
|
|
136
131
|
})
|
|
137
132
|
}),
|
|
133
|
+
/* @__PURE__ */ jsx(Show, {
|
|
134
|
+
when: builtinImports && Object.keys(builtinImports).length > 0,
|
|
135
|
+
children: /* @__PURE__ */ jsx(For, {
|
|
136
|
+
each: Object.entries(builtinImports ?? {}),
|
|
137
|
+
children: ([builtinModule, builtinImports$1]) => code`import ${builtinImports$1 === null ? "" : ` from ${builtinImports$1.filter((i) => !isString(i) && i.default).map((i) => i.alias ? i.alias : i.name).join(", ") + (builtinImports$1.filter((i) => !isString(i) && i.default).length > 0 && builtinImports$1.filter((i) => isString(i) || !i.default).length > 0 ? ", " : "") + (builtinImports$1.filter((i) => isString(i) || !i.default).length > 0 ? `{ ${builtinImports$1.map((i) => isString(i) ? i : i.alias ? `${i.name} as ${i.alias}` : i.name).join(", ")} }` : "")} `} "${builtinModule.includes(":") ? builtinModule : `${context.config.output.builtinPrefix}:${builtinModule}`}";`
|
|
138
|
+
})
|
|
139
|
+
}),
|
|
138
140
|
/* @__PURE__ */ jsx(Show, {
|
|
139
141
|
when: scope.importedModules.size > 0,
|
|
140
142
|
children: /* @__PURE__ */ jsx(ImportStatements, { records: scope.importedModules })
|
|
@@ -0,0 +1,47 @@
|
|
|
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 };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import "../../types/hooks.mjs";
|
|
2
|
+
import "../../types/resolved.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 };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.cjs";
|
|
2
|
+
import { InferHookParameters, InferHookReturnType } from "./hooks.cjs";
|
|
3
|
+
import { ResolvedConfig } from "./resolved.cjs";
|
|
4
|
+
import { APIContext, EnvironmentContext, PluginContext } from "./context.cjs";
|
|
5
|
+
import { CallHookOptions } from "../internal/helpers/hooks.cjs";
|
|
6
|
+
|
|
7
|
+
//#region ../powerlines/src/types/api.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Powerlines API Interface
|
|
11
|
+
*/
|
|
12
|
+
interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
13
|
+
/**
|
|
14
|
+
* The Powerlines shared API context
|
|
15
|
+
*/
|
|
16
|
+
context: APIContext<TResolvedConfig>;
|
|
17
|
+
/**
|
|
18
|
+
* Prepare the Powerlines API
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This method will prepare the Powerlines API for use, initializing any necessary resources.
|
|
22
|
+
*
|
|
23
|
+
* @param inlineConfig - The inline configuration for the prepare command
|
|
24
|
+
*/
|
|
25
|
+
prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new Powerlines project
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This method will create a new Powerlines project in the current directory.
|
|
31
|
+
*
|
|
32
|
+
* @param inlineConfig - The inline configuration for the new command
|
|
33
|
+
* @returns A promise that resolves when the project has been created
|
|
34
|
+
*/
|
|
35
|
+
new: (inlineConfig: NewInlineConfig) => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Clean any previously prepared artifacts
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This method will remove the previous Powerlines artifacts from the project.
|
|
41
|
+
*
|
|
42
|
+
* @param inlineConfig - The inline configuration for the clean command
|
|
43
|
+
* @returns A promise that resolves when the clean command has completed
|
|
44
|
+
*/
|
|
45
|
+
clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Lint the project source code
|
|
48
|
+
*
|
|
49
|
+
* @param inlineConfig - The inline configuration for the lint command
|
|
50
|
+
* @returns A promise that resolves when the lint command has completed
|
|
51
|
+
*/
|
|
52
|
+
lint: (inlineConfig: LintInlineConfig) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Build the project
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* This method will build the Powerlines project, generating the necessary artifacts.
|
|
58
|
+
*
|
|
59
|
+
* @param inlineConfig - The inline configuration for the build command
|
|
60
|
+
* @returns A promise that resolves when the build command has completed
|
|
61
|
+
*/
|
|
62
|
+
build: (inlineConfig: BuildInlineConfig) => Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Prepare the documentation for the project
|
|
65
|
+
*
|
|
66
|
+
* @param inlineConfig - The inline configuration for the docs command
|
|
67
|
+
* @returns A promise that resolves when the documentation generation has completed
|
|
68
|
+
*/
|
|
69
|
+
docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Deploy the project source code
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
|
|
75
|
+
*
|
|
76
|
+
* @param inlineConfig - The inline configuration for the deploy command
|
|
77
|
+
*/
|
|
78
|
+
deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Finalization process
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
|
|
84
|
+
*
|
|
85
|
+
* @returns A promise that resolves when the finalization process has completed
|
|
86
|
+
*/
|
|
87
|
+
finalize: () => Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Invokes the configured plugin hooks
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
93
|
+
*
|
|
94
|
+
* @param hook - The hook to call
|
|
95
|
+
* @param options - The options to provide to the hook
|
|
96
|
+
* @param args - The arguments to pass to the hook
|
|
97
|
+
* @returns The result of the hook call
|
|
98
|
+
*/
|
|
99
|
+
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
100
|
+
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
101
|
+
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { API };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, LintInlineConfig, NewInlineConfig, PrepareInlineConfig } from "./config.mjs";
|
|
2
|
+
import { InferHookParameters, InferHookReturnType } from "./hooks.mjs";
|
|
3
|
+
import { ResolvedConfig } from "./resolved.mjs";
|
|
4
|
+
import { APIContext, EnvironmentContext, PluginContext } from "./context.mjs";
|
|
5
|
+
import { CallHookOptions } from "../internal/helpers/hooks.mjs";
|
|
6
|
+
|
|
7
|
+
//#region ../powerlines/src/types/api.d.ts
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Powerlines API Interface
|
|
11
|
+
*/
|
|
12
|
+
interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
13
|
+
/**
|
|
14
|
+
* The Powerlines shared API context
|
|
15
|
+
*/
|
|
16
|
+
context: APIContext<TResolvedConfig>;
|
|
17
|
+
/**
|
|
18
|
+
* Prepare the Powerlines API
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* This method will prepare the Powerlines API for use, initializing any necessary resources.
|
|
22
|
+
*
|
|
23
|
+
* @param inlineConfig - The inline configuration for the prepare command
|
|
24
|
+
*/
|
|
25
|
+
prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new Powerlines project
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This method will create a new Powerlines project in the current directory.
|
|
31
|
+
*
|
|
32
|
+
* @param inlineConfig - The inline configuration for the new command
|
|
33
|
+
* @returns A promise that resolves when the project has been created
|
|
34
|
+
*/
|
|
35
|
+
new: (inlineConfig: NewInlineConfig) => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Clean any previously prepared artifacts
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
* This method will remove the previous Powerlines artifacts from the project.
|
|
41
|
+
*
|
|
42
|
+
* @param inlineConfig - The inline configuration for the clean command
|
|
43
|
+
* @returns A promise that resolves when the clean command has completed
|
|
44
|
+
*/
|
|
45
|
+
clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Lint the project source code
|
|
48
|
+
*
|
|
49
|
+
* @param inlineConfig - The inline configuration for the lint command
|
|
50
|
+
* @returns A promise that resolves when the lint command has completed
|
|
51
|
+
*/
|
|
52
|
+
lint: (inlineConfig: LintInlineConfig) => Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Build the project
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* This method will build the Powerlines project, generating the necessary artifacts.
|
|
58
|
+
*
|
|
59
|
+
* @param inlineConfig - The inline configuration for the build command
|
|
60
|
+
* @returns A promise that resolves when the build command has completed
|
|
61
|
+
*/
|
|
62
|
+
build: (inlineConfig: BuildInlineConfig) => Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Prepare the documentation for the project
|
|
65
|
+
*
|
|
66
|
+
* @param inlineConfig - The inline configuration for the docs command
|
|
67
|
+
* @returns A promise that resolves when the documentation generation has completed
|
|
68
|
+
*/
|
|
69
|
+
docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Deploy the project source code
|
|
72
|
+
*
|
|
73
|
+
* @remarks
|
|
74
|
+
* This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
|
|
75
|
+
*
|
|
76
|
+
* @param inlineConfig - The inline configuration for the deploy command
|
|
77
|
+
*/
|
|
78
|
+
deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Finalization process
|
|
81
|
+
*
|
|
82
|
+
* @remarks
|
|
83
|
+
* This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
|
|
84
|
+
*
|
|
85
|
+
* @returns A promise that resolves when the finalization process has completed
|
|
86
|
+
*/
|
|
87
|
+
finalize: () => Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* Invokes the configured plugin hooks
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
|
|
93
|
+
*
|
|
94
|
+
* @param hook - The hook to call
|
|
95
|
+
* @param options - The options to provide to the hook
|
|
96
|
+
* @param args - The arguments to pass to the hook
|
|
97
|
+
* @returns The result of the hook call
|
|
98
|
+
*/
|
|
99
|
+
callHook: <TKey extends string>(hook: TKey, options: CallHookOptions & {
|
|
100
|
+
environment?: string | EnvironmentContext<TResolvedConfig>;
|
|
101
|
+
}, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey> | undefined>;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { API };
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { OutputOptions, RollupOptions } from "rollup";
|
|
2
|
+
import { UserConfig } from "@farmfe/core";
|
|
3
|
+
import { Configuration } from "@rspack/core";
|
|
4
|
+
import { BuildOptions } from "@storm-software/tsup/types";
|
|
5
|
+
import { UnbuildOptions } from "@storm-software/unbuild/types";
|
|
6
|
+
import { BuildOptions as BuildOptions$1 } from "esbuild";
|
|
7
|
+
import { RolldownOptions } from "rolldown";
|
|
8
|
+
import { UserConfig as UserConfig$1 } from "tsdown";
|
|
9
|
+
import { DepOptimizationOptions, UserConfig as UserConfig$2 } from "vite";
|
|
10
|
+
import { Configuration as Configuration$1 } from "webpack";
|
|
2
11
|
|
|
3
|
-
|
|
12
|
+
//#region ../powerlines/src/types/build.d.ts
|
|
13
|
+
type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
|
|
14
|
+
type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
|
|
15
|
+
type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
|
|
4
16
|
interface BuildConfig {
|
|
5
17
|
/**
|
|
6
18
|
* The platform to build the project for
|
|
@@ -141,5 +153,33 @@ interface BuildConfig {
|
|
|
141
153
|
override?: Record<string, any>;
|
|
142
154
|
}
|
|
143
155
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
156
|
+
type ESBuildBuildConfig = Omit<BuildOptions$1, "entryPoints" | "sourceRoot" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel"> & BuildConfig;
|
|
157
|
+
type ESBuildResolvedBuildConfig = Omit<BuildOptions$1, "inject"> & BuildResolvedConfig;
|
|
158
|
+
type ViteBuildConfig = Omit<UserConfig$2, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
|
|
159
|
+
/**
|
|
160
|
+
* Optimize deps config
|
|
161
|
+
*/
|
|
162
|
+
optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
|
|
163
|
+
};
|
|
164
|
+
type ViteResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
|
|
165
|
+
type WebpackBuildConfig = Omit<Configuration$1, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
|
|
166
|
+
type WebpackResolvedBuildConfig = Configuration$1 & BuildResolvedConfig;
|
|
167
|
+
type RspackBuildConfig = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
|
|
168
|
+
type RspackResolvedBuildConfig = Configuration & BuildResolvedConfig;
|
|
169
|
+
type RollupBuildOutputConfig = Omit<OutputOptions, "dir" | "format">;
|
|
170
|
+
type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "output" | "logLevel"> & {
|
|
171
|
+
output: RollupBuildOutputConfig | RollupBuildOutputConfig[];
|
|
172
|
+
} & BuildConfig;
|
|
173
|
+
type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
|
|
174
|
+
type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
|
|
175
|
+
type RolldownResolvedBuildConfig = RolldownOptions & BuildResolvedConfig;
|
|
176
|
+
type TsupBuildConfig = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
|
|
177
|
+
type TsupResolvedBuildConfig = BuildOptions & BuildResolvedConfig;
|
|
178
|
+
type TsdownBuildConfig = Partial<Omit<UserConfig$1, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
|
|
179
|
+
type TsdownResolvedBuildConfig = UserConfig$1 & BuildResolvedConfig;
|
|
180
|
+
type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
|
|
181
|
+
type UnbuildResolvedBuildConfig = UnbuildOptions & BuildResolvedConfig;
|
|
182
|
+
type FarmBuildConfig = Partial<Omit<UserConfig, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
|
|
183
|
+
type FarmResolvedBuildConfig = UserConfig & BuildResolvedConfig;
|
|
144
184
|
//#endregion
|
|
145
|
-
export { BuildConfig, BuildResolvedConfig,
|
|
185
|
+
export { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, InferUnpluginVariant, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, UnpluginBuilderVariant, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig };
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import "esbuild";
|
|
1
|
+
import { BuildOptions } from "esbuild";
|
|
2
|
+
import { OutputOptions, RollupOptions } from "rollup";
|
|
3
|
+
import { UserConfig } from "@farmfe/core";
|
|
4
|
+
import { Configuration } from "@rspack/core";
|
|
5
|
+
import { BuildOptions as BuildOptions$1 } from "@storm-software/tsup/types";
|
|
6
|
+
import { UnbuildOptions } from "@storm-software/unbuild/types";
|
|
7
|
+
import { RolldownOptions } from "rolldown";
|
|
8
|
+
import { UserConfig as UserConfig$1 } from "tsdown";
|
|
9
|
+
import { DepOptimizationOptions, UserConfig as UserConfig$2 } from "vite";
|
|
10
|
+
import { Configuration as Configuration$1 } from "webpack";
|
|
2
11
|
|
|
3
12
|
//#region ../powerlines/src/types/build.d.ts
|
|
4
|
-
|
|
5
|
-
type
|
|
13
|
+
type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
|
|
14
|
+
type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
|
|
15
|
+
type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
|
|
6
16
|
interface BuildConfig {
|
|
7
17
|
/**
|
|
8
18
|
* The platform to build the project for
|
|
@@ -143,5 +153,33 @@ interface BuildConfig {
|
|
|
143
153
|
override?: Record<string, any>;
|
|
144
154
|
}
|
|
145
155
|
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
156
|
+
type ESBuildBuildConfig = Omit<BuildOptions, "entryPoints" | "sourceRoot" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel"> & BuildConfig;
|
|
157
|
+
type ESBuildResolvedBuildConfig = Omit<BuildOptions, "inject"> & BuildResolvedConfig;
|
|
158
|
+
type ViteBuildConfig = Omit<UserConfig$2, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
|
|
159
|
+
/**
|
|
160
|
+
* Optimize deps config
|
|
161
|
+
*/
|
|
162
|
+
optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
|
|
163
|
+
};
|
|
164
|
+
type ViteResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
|
|
165
|
+
type WebpackBuildConfig = Omit<Configuration$1, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
|
|
166
|
+
type WebpackResolvedBuildConfig = Configuration$1 & BuildResolvedConfig;
|
|
167
|
+
type RspackBuildConfig = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
|
|
168
|
+
type RspackResolvedBuildConfig = Configuration & BuildResolvedConfig;
|
|
169
|
+
type RollupBuildOutputConfig = Omit<OutputOptions, "dir" | "format">;
|
|
170
|
+
type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "output" | "logLevel"> & {
|
|
171
|
+
output: RollupBuildOutputConfig | RollupBuildOutputConfig[];
|
|
172
|
+
} & BuildConfig;
|
|
173
|
+
type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
|
|
174
|
+
type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
|
|
175
|
+
type RolldownResolvedBuildConfig = RolldownOptions & BuildResolvedConfig;
|
|
176
|
+
type TsupBuildConfig = Partial<Omit<BuildOptions$1, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
|
|
177
|
+
type TsupResolvedBuildConfig = BuildOptions$1 & BuildResolvedConfig;
|
|
178
|
+
type TsdownBuildConfig = Partial<Omit<UserConfig$1, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
|
|
179
|
+
type TsdownResolvedBuildConfig = UserConfig$1 & BuildResolvedConfig;
|
|
180
|
+
type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
|
|
181
|
+
type UnbuildResolvedBuildConfig = UnbuildOptions & BuildResolvedConfig;
|
|
182
|
+
type FarmBuildConfig = Partial<Omit<UserConfig, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
|
|
183
|
+
type FarmResolvedBuildConfig = UserConfig & BuildResolvedConfig;
|
|
146
184
|
//#endregion
|
|
147
|
-
export { BuildConfig, BuildResolvedConfig,
|
|
185
|
+
export { BuildConfig, BuildResolvedConfig, BuilderVariant, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, InferUnpluginVariant, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, UnpluginBuilderVariant, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuildConfig, BuildResolvedConfig } from "./build.cjs";
|
|
1
|
+
import { BuildConfig, BuildResolvedConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig } from "./build.cjs";
|
|
2
2
|
import { BabelTransformPluginOptions } from "./babel.cjs";
|
|
3
3
|
import { StoragePort, StoragePreset } from "./fs.cjs";
|
|
4
4
|
import { TSConfig } from "./tsconfig.cjs";
|
|
@@ -352,7 +352,7 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
352
352
|
*/
|
|
353
353
|
framework?: string;
|
|
354
354
|
}
|
|
355
|
-
interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
355
|
+
interface UserConfig$1<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
|
|
356
356
|
/**
|
|
357
357
|
* Configuration provided to build processes
|
|
358
358
|
*
|
|
@@ -373,15 +373,71 @@ interface UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResol
|
|
|
373
373
|
override?: Partial<TBuildResolvedConfig>;
|
|
374
374
|
};
|
|
375
375
|
}
|
|
376
|
+
type WebpackUserConfig = UserConfig$1<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
|
|
377
|
+
type RspackUserConfig = UserConfig$1<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
|
|
378
|
+
type RollupUserConfig = UserConfig$1<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
|
|
379
|
+
type RolldownUserConfig = UserConfig$1<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
|
|
380
|
+
type ViteUserConfig = UserConfig$1<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
|
|
381
|
+
type ESBuildUserConfig = UserConfig$1<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
|
|
382
|
+
type UnbuildUserConfig = UserConfig$1<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
|
|
383
|
+
type TsupUserConfig = UserConfig$1<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
|
|
384
|
+
type TsdownUserConfig = UserConfig$1<TsdownBuildConfig, TsdownResolvedBuildConfig, "tsdown">;
|
|
385
|
+
type FarmUserConfig = UserConfig$1<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
|
|
376
386
|
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
377
387
|
/**
|
|
378
388
|
* The configuration provided while executing Powerlines commands.
|
|
379
389
|
*/
|
|
380
|
-
type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
|
|
390
|
+
type InlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Partial<TUserConfig> & {
|
|
381
391
|
/**
|
|
382
392
|
* A string identifier for the Powerlines command being executed
|
|
383
393
|
*/
|
|
384
394
|
command: PowerlinesCommand;
|
|
385
395
|
};
|
|
396
|
+
type NewInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
|
|
397
|
+
/**
|
|
398
|
+
* A string identifier for the Powerlines command being executed
|
|
399
|
+
*/
|
|
400
|
+
command: "new";
|
|
401
|
+
/**
|
|
402
|
+
* The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
|
|
403
|
+
*/
|
|
404
|
+
packageName?: string;
|
|
405
|
+
};
|
|
406
|
+
type CleanInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
|
|
407
|
+
/**
|
|
408
|
+
* A string identifier for the Powerlines command being executed
|
|
409
|
+
*/
|
|
410
|
+
command: "clean";
|
|
411
|
+
};
|
|
412
|
+
type PrepareInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
|
|
413
|
+
/**
|
|
414
|
+
* A string identifier for the Powerlines command being executed
|
|
415
|
+
*/
|
|
416
|
+
command: "prepare";
|
|
417
|
+
};
|
|
418
|
+
type BuildInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
|
|
419
|
+
/**
|
|
420
|
+
* A string identifier for the Powerlines command being executed
|
|
421
|
+
*/
|
|
422
|
+
command: "build";
|
|
423
|
+
};
|
|
424
|
+
type LintInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
|
|
425
|
+
/**
|
|
426
|
+
* A string identifier for the Powerlines command being executed
|
|
427
|
+
*/
|
|
428
|
+
command: "lint";
|
|
429
|
+
};
|
|
430
|
+
type DocsInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
|
|
431
|
+
/**
|
|
432
|
+
* A string identifier for the Powerlines command being executed
|
|
433
|
+
*/
|
|
434
|
+
command: "docs";
|
|
435
|
+
};
|
|
436
|
+
type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = InlineConfig<TUserConfig> & {
|
|
437
|
+
/**
|
|
438
|
+
* A string identifier for the Powerlines command being executed
|
|
439
|
+
*/
|
|
440
|
+
command: "deploy";
|
|
441
|
+
};
|
|
386
442
|
//#endregion
|
|
387
|
-
export { BabelUserConfig, EnvironmentConfig, InlineConfig, LogFn, OutputConfig, PluginConfig, UserConfig, WorkspaceConfig };
|
|
443
|
+
export { BabelUserConfig, BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
|