@powerlines/plugin-pulumi 0.2.203 → 0.2.204

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.
Files changed (33) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.cts +2 -1
  3. package/dist/index.d.mts +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/types/plugin.d.cts +3 -3
  6. package/dist/types/plugin.d.mts +3 -3
  7. package/package.json +3 -3
  8. package/dist/powerlines/src/internal/helpers/hooks.d.cts +0 -47
  9. package/dist/powerlines/src/internal/helpers/hooks.d.mts +0 -47
  10. package/dist/powerlines/src/plugin-utils/context-helpers.cjs +0 -49
  11. package/dist/powerlines/src/plugin-utils/context-helpers.mjs +0 -47
  12. package/dist/powerlines/src/types/api.d.cts +0 -104
  13. package/dist/powerlines/src/types/api.d.mts +0 -104
  14. package/dist/powerlines/src/types/build.d.cts +0 -185
  15. package/dist/powerlines/src/types/build.d.mts +0 -185
  16. package/dist/powerlines/src/types/commands.d.cts +0 -8
  17. package/dist/powerlines/src/types/commands.d.mts +0 -8
  18. package/dist/powerlines/src/types/config.d.cts +0 -424
  19. package/dist/powerlines/src/types/config.d.mts +0 -424
  20. package/dist/powerlines/src/types/context.d.cts +0 -514
  21. package/dist/powerlines/src/types/context.d.mts +0 -514
  22. package/dist/powerlines/src/types/fs.d.cts +0 -486
  23. package/dist/powerlines/src/types/fs.d.mts +0 -486
  24. package/dist/powerlines/src/types/hooks.d.cts +0 -32
  25. package/dist/powerlines/src/types/hooks.d.mts +0 -32
  26. package/dist/powerlines/src/types/plugin.d.cts +0 -205
  27. package/dist/powerlines/src/types/plugin.d.mts +0 -205
  28. package/dist/powerlines/src/types/resolved.d.cts +0 -93
  29. package/dist/powerlines/src/types/resolved.d.mts +0 -93
  30. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  31. package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
  32. package/dist/powerlines/src/types/unplugin.d.cts +0 -22
  33. package/dist/powerlines/src/types/unplugin.d.mts +0 -22
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_context_helpers = require('./powerlines/src/plugin-utils/context-helpers.cjs');
4
3
  let __pulumi_pulumi_automation = require("@pulumi/pulumi/automation");
5
4
  let __stryke_helpers_index = require("@stryke/helpers/index");
6
5
  let __stryke_path_join = require("@stryke/path/join");
7
6
  let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
8
7
  let defu = require("defu");
9
8
  defu = require_rolldown_runtime.__toESM(defu);
9
+ let powerlines_plugin_utils_context_helpers = require("powerlines/plugin-utils/context-helpers");
10
10
 
11
11
  //#region src/index.ts
12
12
  /**
@@ -28,7 +28,7 @@ const plugin = (options = {}) => {
28
28
  }) } };
29
29
  },
30
30
  async configResolved() {
31
- if (!options.stack) this.config.deploy.pulumi.stackName ??= (0, __pulumi_pulumi_automation.fullyQualifiedStackName)((0, __stryke_string_format_kebab_case.kebabCase)(require_context_helpers.getOrganizationName(this) || "default"), `${require_context_helpers.getWorkspaceName(this) ? `${(0, __stryke_string_format_kebab_case.kebabCase)(require_context_helpers.getWorkspaceName(this))}-` : ""}${(0, __stryke_string_format_kebab_case.kebabCase)(this.config.name)}`, this.config.mode);
31
+ if (!options.stack) this.config.deploy.pulumi.stackName ??= (0, __pulumi_pulumi_automation.fullyQualifiedStackName)((0, __stryke_string_format_kebab_case.kebabCase)((0, powerlines_plugin_utils_context_helpers.getOrganizationName)(this) || "default"), `${(0, powerlines_plugin_utils_context_helpers.getWorkspaceName)(this) ? `${(0, __stryke_string_format_kebab_case.kebabCase)((0, powerlines_plugin_utils_context_helpers.getWorkspaceName)(this))}-` : ""}${(0, __stryke_string_format_kebab_case.kebabCase)(this.config.name)}`, this.config.mode);
32
32
  },
33
33
  deploy: {
34
34
  order: "post",
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
1
  import { PulumiPluginBaseOptions, PulumiPluginContext, PulumiPluginCreateStackInlineOptions, PulumiPluginCreateStackLocalOptions, PulumiPluginCreateStackOptions, PulumiPluginDeployConfig, PulumiPluginExistingStackOptions, PulumiPluginOptions, PulumiPluginResolvedConfig, PulumiPluginResolvedOptions, PulumiPluginUserConfig, __ΩPulumiPluginBaseOptions, __ΩPulumiPluginContext, __ΩPulumiPluginCreateStackInlineOptions, __ΩPulumiPluginCreateStackLocalOptions, __ΩPulumiPluginCreateStackOptions, __ΩPulumiPluginDeployConfig, __ΩPulumiPluginExistingStackOptions, __ΩPulumiPluginOptions, __ΩPulumiPluginResolvedConfig, __ΩPulumiPluginResolvedOptions, __ΩPulumiPluginUserConfig } from "./types/plugin.cjs";
2
+ import "./types/index.cjs";
3
+ import { Plugin } from "powerlines/types/plugin";
3
4
 
4
5
  //#region src/index.d.ts
5
6
 
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
1
  import { PulumiPluginBaseOptions, PulumiPluginContext, PulumiPluginCreateStackInlineOptions, PulumiPluginCreateStackLocalOptions, PulumiPluginCreateStackOptions, PulumiPluginDeployConfig, PulumiPluginExistingStackOptions, PulumiPluginOptions, PulumiPluginResolvedConfig, PulumiPluginResolvedOptions, PulumiPluginUserConfig, __ΩPulumiPluginBaseOptions, __ΩPulumiPluginContext, __ΩPulumiPluginCreateStackInlineOptions, __ΩPulumiPluginCreateStackLocalOptions, __ΩPulumiPluginCreateStackOptions, __ΩPulumiPluginDeployConfig, __ΩPulumiPluginExistingStackOptions, __ΩPulumiPluginOptions, __ΩPulumiPluginResolvedConfig, __ΩPulumiPluginResolvedOptions, __ΩPulumiPluginUserConfig } from "./types/plugin.mjs";
3
2
  import "./types/index.mjs";
3
+ import { Plugin } from "powerlines/types/plugin";
4
4
 
5
5
  //#region src/index.d.ts
6
6
 
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { getOrganizationName, getWorkspaceName } from "./powerlines/src/plugin-utils/context-helpers.mjs";
2
1
  import { LocalWorkspace, fullyQualifiedStackName } from "@pulumi/pulumi/automation";
3
2
  import { omit } from "@stryke/helpers/index";
4
3
  import { joinPaths } from "@stryke/path/join";
5
4
  import { kebabCase } from "@stryke/string-format/kebab-case";
6
5
  import defu from "defu";
6
+ import { getOrganizationName, getWorkspaceName } from "powerlines/plugin-utils/context-helpers";
7
7
 
8
8
  //#region src/index.ts
9
9
  /**
@@ -1,7 +1,7 @@
1
- import { DeployConfig, UserConfig } from "../powerlines/src/types/config.cjs";
2
- import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
- import { PluginContext } from "../powerlines/src/types/context.cjs";
4
1
  import { LocalWorkspaceOptions, PulumiFn, Stack, StackSettings } from "@pulumi/pulumi/automation";
2
+ import { DeployConfig, UserConfig } from "powerlines/types/config";
3
+ import { PluginContext } from "powerlines/types/context";
4
+ import { ResolvedConfig } from "powerlines/types/resolved";
5
5
 
6
6
  //#region src/types/plugin.d.ts
7
7
  interface PulumiPluginBaseOptions {
@@ -1,7 +1,7 @@
1
- import { DeployConfig, UserConfig } from "../powerlines/src/types/config.mjs";
2
- import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
- import { PluginContext } from "../powerlines/src/types/context.mjs";
4
1
  import { LocalWorkspaceOptions, PulumiFn, Stack, StackSettings } from "@pulumi/pulumi/automation";
2
+ import { DeployConfig, UserConfig } from "powerlines/types/config";
3
+ import { PluginContext } from "powerlines/types/context";
4
+ import { ResolvedConfig } from "powerlines/types/resolved";
5
5
 
6
6
  //#region src/types/plugin.d.ts
7
7
  interface PulumiPluginBaseOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-pulumi",
3
- "version": "0.2.203",
3
+ "version": "0.2.204",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to transform source code to be platform agnostic using pulumi.",
6
6
  "repository": {
@@ -129,9 +129,9 @@
129
129
  "typescript": "^5.9.3"
130
130
  },
131
131
  "devDependencies": {
132
- "@powerlines/plugin-plugin": "^0.12.174",
132
+ "@powerlines/plugin-plugin": "^0.12.175",
133
133
  "@types/node": "^24.10.9"
134
134
  },
135
135
  "publishConfig": { "access": "public" },
136
- "gitHead": "2852dab8ff7cad2d1aa4a44d7fd2479d62f65d47"
136
+ "gitHead": "f153baa7a374fe331eeb1b8ea37c30c379c5efce"
137
137
  }
@@ -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,47 +0,0 @@
1
- import { SelectHooksOptions } from "../../types/context.mjs";
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
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
3
- let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
4
-
5
- //#region ../powerlines/src/plugin-utils/context-helpers.ts
6
- /**
7
- * Get the organization name from the context
8
- *
9
- * @param context - The Powerlines plugin context.
10
- * @returns The organization name or undefined if not found.
11
- */
12
- function getOrganizationName(context) {
13
- let result;
14
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
15
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
16
- if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
17
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
18
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
19
- }
20
- if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
21
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.author[0])) result = context.packageJson.author[0].name;
22
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.author[0])) result = context.packageJson.author[0];
23
- }
24
- if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
25
- if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
26
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
27
- }
28
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
29
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
30
- return result;
31
- }
32
- /**
33
- * Get the organization name from the context
34
- *
35
- * @param context - The Powerlines plugin context.
36
- * @returns The organization name or undefined if not found.
37
- */
38
- function getWorkspaceName(context) {
39
- let result;
40
- if ((0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.name)) result = context.workspaceConfig.name;
41
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
42
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
43
- if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
44
- return result;
45
- }
46
-
47
- //#endregion
48
- exports.getOrganizationName = getOrganizationName;
49
- exports.getWorkspaceName = getWorkspaceName;
@@ -1,47 +0,0 @@
1
- import { isSetObject } from "@stryke/type-checks/is-set-object";
2
- import { isSetString } from "@stryke/type-checks/is-set-string";
3
-
4
- //#region ../powerlines/src/plugin-utils/context-helpers.ts
5
- /**
6
- * Get the organization name from the context
7
- *
8
- * @param context - The Powerlines plugin context.
9
- * @returns The organization name or undefined if not found.
10
- */
11
- function getOrganizationName(context) {
12
- let result;
13
- if (isSetObject(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
14
- if (!result && isSetString(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
15
- if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
16
- if (isSetObject(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
17
- if (!result && isSetString(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
18
- }
19
- if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
20
- if (isSetObject(context.packageJson.author[0])) result = context.packageJson.author[0].name;
21
- if (!result && isSetString(context.packageJson.author[0])) result = context.packageJson.author[0];
22
- }
23
- if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
24
- if (isSetObject(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
25
- if (!result && isSetString(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
26
- }
27
- if (!result && isSetString(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
28
- if (!result && isSetString(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
29
- return result;
30
- }
31
- /**
32
- * Get the organization name from the context
33
- *
34
- * @param context - The Powerlines plugin context.
35
- * @returns The organization name or undefined if not found.
36
- */
37
- function getWorkspaceName(context) {
38
- let result;
39
- if (isSetString(context.workspaceConfig.name)) result = context.workspaceConfig.name;
40
- if (!result && isSetString(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
41
- if (!result && isSetString(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
42
- if (!result && isSetString(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
43
- return result;
44
- }
45
-
46
- //#endregion
47
- export { getOrganizationName, getWorkspaceName };
@@ -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 };