@powerlines/plugin-react 0.1.264 → 0.1.265
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/index.cjs +5 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +6 -6
- 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/typescript/tsconfig.cjs +0 -37
- package/dist/powerlines/src/lib/typescript/tsconfig.mjs +0 -35
- 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.mts +0 -2
- 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 -424
- package/dist/powerlines/src/types/config.d.mts +0 -424
- 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/plugin.d.cts +0 -205
- package/dist/powerlines/src/types/plugin.d.mts +0 -205
- package/dist/powerlines/src/types/resolved.d.cts +0 -93
- package/dist/powerlines/src/types/resolved.d.mts +0 -93
- 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
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
3
|
-
const require_tsconfig = require('./powerlines/src/lib/typescript/tsconfig.cjs');
|
|
4
3
|
const require_components_react_optimized = require('./components/react-optimized.cjs');
|
|
5
4
|
require('./components/index.cjs');
|
|
6
5
|
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
@@ -14,6 +13,7 @@ let __vitejs_plugin_react = require("@vitejs/plugin-react");
|
|
|
14
13
|
__vitejs_plugin_react = require_rolldown_runtime.__toESM(__vitejs_plugin_react);
|
|
15
14
|
let defu = require("defu");
|
|
16
15
|
defu = require_rolldown_runtime.__toESM(defu);
|
|
16
|
+
let powerlines_lib_typescript_tsconfig = require("powerlines/lib/typescript/tsconfig");
|
|
17
17
|
|
|
18
18
|
//#region src/index.tsx
|
|
19
19
|
/**
|
|
@@ -60,14 +60,14 @@ const plugin = (options = {}) => {
|
|
|
60
60
|
if (this.tsconfig.options.jsxImportSource === "react") this.tsconfig.tsconfigJson.compilerOptions.jsx ??= "react-jsx";
|
|
61
61
|
else this.tsconfig.tsconfigJson.compilerOptions.jsx ??= "preserve";
|
|
62
62
|
if (this.environment.consumer === "client") {
|
|
63
|
-
if (!
|
|
64
|
-
if (!
|
|
63
|
+
if (!(0, powerlines_lib_typescript_tsconfig.isMatchFound)("dom", this.tsconfig.tsconfigJson.compilerOptions.lib)) this.tsconfig.tsconfigJson.compilerOptions.lib.push("DOM");
|
|
64
|
+
if (!(0, powerlines_lib_typescript_tsconfig.isMatchFound)("dom.iterable", this.tsconfig.tsconfigJson.compilerOptions.lib)) this.tsconfig.tsconfigJson.compilerOptions.lib.push("DOM.Iterable");
|
|
65
65
|
}
|
|
66
|
-
if (!
|
|
66
|
+
if (!(0, powerlines_lib_typescript_tsconfig.isMatchFound)("esnext", this.tsconfig.tsconfigJson.compilerOptions.lib)) this.tsconfig.tsconfigJson.compilerOptions.lib.push("ESNext");
|
|
67
67
|
if (this.tsconfig.options.resolveJsonModule !== true) this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule = true;
|
|
68
68
|
if (this.config.build.variant === "vite") {
|
|
69
69
|
this.tsconfig.tsconfigJson.compilerOptions.types ??= [];
|
|
70
|
-
if (!
|
|
70
|
+
if (!(0, powerlines_lib_typescript_tsconfig.isMatchFound)("vite/client", this.tsconfig.tsconfigJson.compilerOptions.types)) this.tsconfig.tsconfigJson.compilerOptions.types.push("vite/client");
|
|
71
71
|
const viteBuildConfig = this.config.build;
|
|
72
72
|
viteBuildConfig.build ??= {};
|
|
73
73
|
viteBuildConfig.build.target = "chrome95";
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactOptimizedBuiltin, ReactOptimizedBuiltinProps, __ΩReactOptimizedBuiltinProps } from "./components/react-optimized.cjs";
|
|
2
2
|
import "./components/index.cjs";
|
|
3
|
-
import { Plugin } from "./powerlines/src/types/plugin.cjs";
|
|
4
3
|
import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./types/plugin.cjs";
|
|
5
4
|
import { ReactEnvInterface, __ΩReactEnvInterface } from "./types/runtime.cjs";
|
|
6
5
|
import "./types/index.cjs";
|
|
6
|
+
import { Plugin } from "powerlines/types/plugin";
|
|
7
7
|
|
|
8
8
|
//#region src/index.d.ts
|
|
9
9
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactOptimizedBuiltin, ReactOptimizedBuiltinProps, __ΩReactOptimizedBuiltinProps } from "./components/react-optimized.mjs";
|
|
2
2
|
import "./components/index.mjs";
|
|
3
|
-
import { Plugin } from "./powerlines/src/types/plugin.mjs";
|
|
4
3
|
import { ReactCompilerOptions, ReactPluginContext, ReactPluginOptions, ReactPluginResolvedConfig, ReactPluginUserConfig, __ΩReactCompilerOptions, __ΩReactPluginContext, __ΩReactPluginOptions, __ΩReactPluginResolvedConfig, __ΩReactPluginUserConfig } from "./types/plugin.mjs";
|
|
5
4
|
import { ReactEnvInterface, __ΩReactEnvInterface } from "./types/runtime.mjs";
|
|
6
5
|
import "./types/index.mjs";
|
|
6
|
+
import { Plugin } from "powerlines/types/plugin";
|
|
7
7
|
|
|
8
8
|
//#region src/index.d.ts
|
|
9
9
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isMatchFound } from "./powerlines/src/lib/typescript/tsconfig.mjs";
|
|
2
1
|
import { ReactOptimizedBuiltin } from "./components/react-optimized.mjs";
|
|
3
2
|
import "./components/index.mjs";
|
|
4
3
|
import { createComponent } from "@alloy-js/core/jsx-runtime";
|
|
@@ -8,6 +7,7 @@ import env from "@powerlines/plugin-env";
|
|
|
8
7
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
9
8
|
import viteReactPlugin from "@vitejs/plugin-react";
|
|
10
9
|
import defu from "defu";
|
|
10
|
+
import { isMatchFound } from "powerlines/lib/typescript/tsconfig";
|
|
11
11
|
|
|
12
12
|
//#region src/index.tsx
|
|
13
13
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.265",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for building a React application.",
|
|
6
6
|
"repository": {
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"@alloy-js/markdown": "^0.22.0",
|
|
79
79
|
"@alloy-js/typescript": "^0.22.0",
|
|
80
80
|
"@babel/core": "^7.28.6",
|
|
81
|
-
"@powerlines/plugin-alloy": "^0.19.
|
|
82
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
83
|
-
"@powerlines/plugin-env": "^0.15.
|
|
81
|
+
"@powerlines/plugin-alloy": "^0.19.8",
|
|
82
|
+
"@powerlines/plugin-babel": "^0.12.242",
|
|
83
|
+
"@powerlines/plugin-env": "^0.15.136",
|
|
84
84
|
"@storm-software/config-tools": "^1.189.0",
|
|
85
85
|
"@stryke/cli": "^0.13.10",
|
|
86
86
|
"@stryke/convert": "^0.6.37",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"powerlines": "^0.38.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
95
|
+
"@powerlines/plugin-plugin": "^0.12.184",
|
|
96
96
|
"@types/node": "^24.10.9",
|
|
97
97
|
"@types/react": "^19.2.9",
|
|
98
98
|
"@types/react-dom": "^19.2.3"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": { "access": "public" },
|
|
101
101
|
"types": "./dist/index.d.cts",
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "8a8bee34b0195608f4e45380ea3bcf33b9da18d7"
|
|
103
103
|
}
|
|
@@ -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/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 };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
let defu = require("defu");
|
|
3
|
-
defu = require_rolldown_runtime.__toESM(defu);
|
|
4
|
-
require("@stryke/fs/exists");
|
|
5
|
-
require("@stryke/fs/json");
|
|
6
|
-
require("@stryke/path/append");
|
|
7
|
-
require("@stryke/path/join-paths");
|
|
8
|
-
require("typescript");
|
|
9
|
-
|
|
10
|
-
//#region ../powerlines/src/lib/typescript/tsconfig.ts
|
|
11
|
-
/**
|
|
12
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
13
|
-
*
|
|
14
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
15
|
-
* @param types - An array of type names to check against.
|
|
16
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
17
|
-
*/
|
|
18
|
-
function findMatch(tsconfigType, types, extensions = [
|
|
19
|
-
".ts",
|
|
20
|
-
".tsx",
|
|
21
|
-
".d.ts"
|
|
22
|
-
]) {
|
|
23
|
-
return types.find((type) => tsconfigType?.toString().toLowerCase() === type?.toString().toLowerCase() || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}` || `./${tsconfigType?.toString().toLowerCase()}` === type?.toString().toLowerCase() || extensions.some((ext) => `${tsconfigType?.toString().toLowerCase()}${ext}` === type?.toString().toLowerCase() || `${tsconfigType?.toString().toLowerCase()}${ext}` === `./${type?.toString().toLowerCase()}` || `${type?.toString().toLowerCase()}${ext}` === `./${tsconfigType?.toString().toLowerCase()}` || tsconfigType?.toString().toLowerCase() === `${type?.toString().toLowerCase()}${ext}` || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}${ext}` || type?.toString().toLowerCase() === `./${tsconfigType?.toString().toLowerCase()}${ext}`));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
27
|
-
*
|
|
28
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
29
|
-
* @param types - An array of type names to check against.
|
|
30
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
31
|
-
*/
|
|
32
|
-
function isMatchFound(tsconfigType, types) {
|
|
33
|
-
return findMatch(tsconfigType, types) !== void 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
//#endregion
|
|
37
|
-
exports.isMatchFound = isMatchFound;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import defu from "defu";
|
|
2
|
-
import "@stryke/fs/exists";
|
|
3
|
-
import "@stryke/fs/json";
|
|
4
|
-
import "@stryke/path/append";
|
|
5
|
-
import "@stryke/path/join-paths";
|
|
6
|
-
import ts from "typescript";
|
|
7
|
-
|
|
8
|
-
//#region ../powerlines/src/lib/typescript/tsconfig.ts
|
|
9
|
-
/**
|
|
10
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
11
|
-
*
|
|
12
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
13
|
-
* @param types - An array of type names to check against.
|
|
14
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
15
|
-
*/
|
|
16
|
-
function findMatch(tsconfigType, types, extensions = [
|
|
17
|
-
".ts",
|
|
18
|
-
".tsx",
|
|
19
|
-
".d.ts"
|
|
20
|
-
]) {
|
|
21
|
-
return types.find((type) => tsconfigType?.toString().toLowerCase() === type?.toString().toLowerCase() || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}` || `./${tsconfigType?.toString().toLowerCase()}` === type?.toString().toLowerCase() || extensions.some((ext) => `${tsconfigType?.toString().toLowerCase()}${ext}` === type?.toString().toLowerCase() || `${tsconfigType?.toString().toLowerCase()}${ext}` === `./${type?.toString().toLowerCase()}` || `${type?.toString().toLowerCase()}${ext}` === `./${tsconfigType?.toString().toLowerCase()}` || tsconfigType?.toString().toLowerCase() === `${type?.toString().toLowerCase()}${ext}` || tsconfigType?.toString().toLowerCase() === `./${type?.toString().toLowerCase()}${ext}` || type?.toString().toLowerCase() === `./${tsconfigType?.toString().toLowerCase()}${ext}`));
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Check if the TypeScript configuration type matches any of the provided types.
|
|
25
|
-
*
|
|
26
|
-
* @param tsconfigType - The type from the TypeScript configuration.
|
|
27
|
-
* @param types - An array of type names to check against.
|
|
28
|
-
* @returns True if the TypeScript configuration type matches any of the provided types, false otherwise.
|
|
29
|
-
*/
|
|
30
|
-
function isMatchFound(tsconfigType, types) {
|
|
31
|
-
return findMatch(tsconfigType, types) !== void 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
export { isMatchFound };
|
|
@@ -1,104 +0,0 @@
|
|
|
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 };
|
|
@@ -1,104 +0,0 @@
|
|
|
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 };
|