@powerlines/plugin-pulumi 0.2.100 → 0.2.102
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-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +76 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +47 -1
- package/dist/plugin-8twD6FfU.d.cts +1827 -0
- package/dist/plugin-C3MaN5jp.mjs +1 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-Dtx8tspI.d.mts +1827 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -82
- package/dist/types/plugin.d.mts +1 -82
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CTUnla4x.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +4 -4
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/powerlines/src/plugin-utils/context-helpers.cjs +0 -49
- package/dist/powerlines/src/plugin-utils/context-helpers.mjs +0 -47
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -8
- package/dist/powerlines/src/types/config.d.cts +0 -369
- package/dist/powerlines/src/types/config.d.mts +0 -369
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -403
- 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/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -81
- package/dist/powerlines/src/types/resolved.d.mts +0 -81
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,13 +1,85 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
+
key = keys[i];
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
+
__defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
require('./plugin-DHXHjv16.cjs');
|
|
30
|
+
require('./types-DHkg7xmX.cjs');
|
|
4
31
|
let __pulumi_pulumi_automation = require("@pulumi/pulumi/automation");
|
|
5
32
|
let __stryke_helpers_index = require("@stryke/helpers/index");
|
|
6
33
|
let __stryke_path_join = require("@stryke/path/join");
|
|
7
34
|
let __stryke_string_format_kebab_case = require("@stryke/string-format/kebab-case");
|
|
8
35
|
let defu = require("defu");
|
|
9
|
-
defu =
|
|
36
|
+
defu = __toESM(defu);
|
|
37
|
+
let __stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
38
|
+
let __stryke_type_checks_is_set_string = require("@stryke/type-checks/is-set-string");
|
|
10
39
|
|
|
40
|
+
//#region ../powerlines/src/plugin-utils/context-helpers.ts
|
|
41
|
+
/**
|
|
42
|
+
* Get the organization name from the context
|
|
43
|
+
*
|
|
44
|
+
* @param context - The Powerlines plugin context.
|
|
45
|
+
* @returns The organization name or undefined if not found.
|
|
46
|
+
*/
|
|
47
|
+
function getOrganizationName(context) {
|
|
48
|
+
let result;
|
|
49
|
+
if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
|
|
50
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
|
|
51
|
+
if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
|
|
52
|
+
if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
|
|
53
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
|
|
54
|
+
}
|
|
55
|
+
if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
|
|
56
|
+
if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.author[0])) result = context.packageJson.author[0].name;
|
|
57
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.author[0])) result = context.packageJson.author[0];
|
|
58
|
+
}
|
|
59
|
+
if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
|
|
60
|
+
if ((0, __stryke_type_checks_is_set_object.isSetObject)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
|
|
61
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
|
|
62
|
+
}
|
|
63
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
|
|
64
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get the organization name from the context
|
|
69
|
+
*
|
|
70
|
+
* @param context - The Powerlines plugin context.
|
|
71
|
+
* @returns The organization name or undefined if not found.
|
|
72
|
+
*/
|
|
73
|
+
function getWorkspaceName(context) {
|
|
74
|
+
let result;
|
|
75
|
+
if ((0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.name)) result = context.workspaceConfig.name;
|
|
76
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
|
|
77
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
|
|
78
|
+
if (!result && (0, __stryke_type_checks_is_set_string.isSetString)(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
11
83
|
//#region src/index.ts
|
|
12
84
|
/**
|
|
13
85
|
* A package containing a Powerlines plugin to configure infrastructure and deploy a project using Pulumi IaC.
|
|
@@ -28,7 +100,7 @@ const plugin = (options = {}) => {
|
|
|
28
100
|
}) } };
|
|
29
101
|
},
|
|
30
102
|
async configResolved() {
|
|
31
|
-
if (!options.stack) this.config.deploy.pulumi.stackName ??= (0, __pulumi_pulumi_automation.fullyQualifiedStackName)((0, __stryke_string_format_kebab_case.kebabCase)(
|
|
103
|
+
if (!options.stack) this.config.deploy.pulumi.stackName ??= (0, __pulumi_pulumi_automation.fullyQualifiedStackName)((0, __stryke_string_format_kebab_case.kebabCase)(getOrganizationName(this) || "default"), `${getWorkspaceName(this) ? `${(0, __stryke_string_format_kebab_case.kebabCase)(getWorkspaceName(this))}-` : ""}${(0, __stryke_string_format_kebab_case.kebabCase)(this.config.name)}`, this.config.mode);
|
|
32
104
|
},
|
|
33
105
|
deploy: {
|
|
34
106
|
order: "post",
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Plugin } from "./
|
|
2
|
-
import
|
|
1
|
+
import { C as Plugin, S as __ΩPulumiPluginUserConfig, _ as __ΩPulumiPluginDeployConfig, a as PulumiPluginCreateStackOptions, b as __ΩPulumiPluginResolvedConfig, c as PulumiPluginOptions, d as PulumiPluginUserConfig, f as __ΩPulumiPluginBaseOptions, g as __ΩPulumiPluginCreateStackOptions, h as __ΩPulumiPluginCreateStackLocalOptions, i as PulumiPluginCreateStackLocalOptions, l as PulumiPluginResolvedConfig, m as __ΩPulumiPluginCreateStackInlineOptions, n as PulumiPluginContext, o as PulumiPluginDeployConfig, p as __ΩPulumiPluginContext, r as PulumiPluginCreateStackInlineOptions, s as PulumiPluginExistingStackOptions, t as PulumiPluginBaseOptions, u as PulumiPluginResolvedOptions, v as __ΩPulumiPluginExistingStackOptions, x as __ΩPulumiPluginResolvedOptions, y as __ΩPulumiPluginOptions } from "./plugin-8twD6FfU.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
5
5
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Plugin } from "./
|
|
2
|
-
import
|
|
3
|
-
import "./types/index.mjs";
|
|
1
|
+
import { C as Plugin, S as __ΩPulumiPluginUserConfig, _ as __ΩPulumiPluginDeployConfig, a as PulumiPluginCreateStackOptions, b as __ΩPulumiPluginResolvedConfig, c as PulumiPluginOptions, d as PulumiPluginUserConfig, f as __ΩPulumiPluginBaseOptions, g as __ΩPulumiPluginCreateStackOptions, h as __ΩPulumiPluginCreateStackLocalOptions, i as PulumiPluginCreateStackLocalOptions, l as PulumiPluginResolvedConfig, m as __ΩPulumiPluginCreateStackInlineOptions, n as PulumiPluginContext, o as PulumiPluginDeployConfig, p as __ΩPulumiPluginContext, r as PulumiPluginCreateStackInlineOptions, s as PulumiPluginExistingStackOptions, t as PulumiPluginBaseOptions, u as PulumiPluginResolvedOptions, v as __ΩPulumiPluginExistingStackOptions, x as __ΩPulumiPluginResolvedOptions, y as __ΩPulumiPluginOptions } from "./plugin-Dtx8tspI.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
4
3
|
|
|
5
4
|
//#region src/index.d.ts
|
|
6
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,56 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./plugin-C3MaN5jp.mjs";
|
|
2
|
+
import "./types-CTUnla4x.mjs";
|
|
2
3
|
import { LocalWorkspace, fullyQualifiedStackName } from "@pulumi/pulumi/automation";
|
|
3
4
|
import { omit } from "@stryke/helpers/index";
|
|
4
5
|
import { joinPaths } from "@stryke/path/join";
|
|
5
6
|
import { kebabCase } from "@stryke/string-format/kebab-case";
|
|
6
7
|
import defu from "defu";
|
|
8
|
+
import { isSetObject } from "@stryke/type-checks/is-set-object";
|
|
9
|
+
import { isSetString } from "@stryke/type-checks/is-set-string";
|
|
7
10
|
|
|
11
|
+
//#region ../powerlines/src/plugin-utils/context-helpers.ts
|
|
12
|
+
/**
|
|
13
|
+
* Get the organization name from the context
|
|
14
|
+
*
|
|
15
|
+
* @param context - The Powerlines plugin context.
|
|
16
|
+
* @returns The organization name or undefined if not found.
|
|
17
|
+
*/
|
|
18
|
+
function getOrganizationName(context) {
|
|
19
|
+
let result;
|
|
20
|
+
if (isSetObject(context.workspaceConfig.organization)) result = context.workspaceConfig.organization.name;
|
|
21
|
+
if (!result && isSetString(context.workspaceConfig.organization)) result = context.workspaceConfig.organization;
|
|
22
|
+
if (!result && Array.isArray(context.packageJson.maintainers) && context.packageJson.maintainers.length > 0) {
|
|
23
|
+
if (isSetObject(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0].name;
|
|
24
|
+
if (!result && isSetString(context.packageJson.maintainers[0])) result = context.packageJson.maintainers[0];
|
|
25
|
+
}
|
|
26
|
+
if (!result && Array.isArray(context.packageJson.author) && context.packageJson.author.length > 0) {
|
|
27
|
+
if (isSetObject(context.packageJson.author[0])) result = context.packageJson.author[0].name;
|
|
28
|
+
if (!result && isSetString(context.packageJson.author[0])) result = context.packageJson.author[0];
|
|
29
|
+
}
|
|
30
|
+
if (!result && Array.isArray(context.packageJson.contributors) && context.packageJson.contributors.length > 0) {
|
|
31
|
+
if (isSetObject(context.packageJson.contributors[0])) result = context.packageJson.contributors[0].name;
|
|
32
|
+
if (!result && isSetString(context.packageJson.contributors[0])) result = context.packageJson.contributors[0];
|
|
33
|
+
}
|
|
34
|
+
if (!result && isSetString(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
|
|
35
|
+
if (!result && isSetString(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the organization name from the context
|
|
40
|
+
*
|
|
41
|
+
* @param context - The Powerlines plugin context.
|
|
42
|
+
* @returns The organization name or undefined if not found.
|
|
43
|
+
*/
|
|
44
|
+
function getWorkspaceName(context) {
|
|
45
|
+
let result;
|
|
46
|
+
if (isSetString(context.workspaceConfig.name)) result = context.workspaceConfig.name;
|
|
47
|
+
if (!result && isSetString(context.workspaceConfig.namespace)) result = context.workspaceConfig.namespace.replace(/^@/, "");
|
|
48
|
+
if (!result && isSetString(context.packageJson.namespace)) result = context.packageJson.namespace.replace(/^@/, "");
|
|
49
|
+
if (!result && isSetString(context.packageJson.name)) result = context.packageJson.name.replace(/^@/, "").replace(/\/.*$/, "");
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
8
54
|
//#region src/index.ts
|
|
9
55
|
/**
|
|
10
56
|
* A package containing a Powerlines plugin to configure infrastructure and deploy a project using Pulumi IaC.
|