@powerlines/plugin-pulumi 0.5.39 → 0.6.1
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.cjs +7 -1
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +7 -1
- package/dist/plugin.mjs.map +1 -1
- package/dist/types/plugin.d.cts +6 -2
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +6 -2
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +4 -4
package/dist/plugin.cjs
CHANGED
|
@@ -43,7 +43,13 @@ const plugin = (options = {}) => {
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
await this.pulumi.workspace.installPlugin("terraform-provider", "v1.0.2");
|
|
46
|
-
if (this.config.pulumi.
|
|
46
|
+
if (this.config.pulumi.stackSettings && Object.keys(this.config.pulumi.stackSettings).length > 0) await this.pulumi.workspace.saveStackSettings(this.pulumi.name, this.config.pulumi.stackSettings);
|
|
47
|
+
await this.pulumi.workspace.saveProjectSettings((0, defu.default)(this.config.pulumi.projectSettings ?? {}, {
|
|
48
|
+
name: this.config.name,
|
|
49
|
+
runtime: { name: "nodejs" },
|
|
50
|
+
description: this.config.description,
|
|
51
|
+
author: this.config.organization
|
|
52
|
+
}));
|
|
47
53
|
this.info(`Deploying Pulumi stack: ${this.config.pulumi.stackName}`);
|
|
48
54
|
await this.pulumi.refresh({ onOutput: this.debug.bind(this) });
|
|
49
55
|
if (this.config.pulumi.destroy) await this.pulumi.destroy({ onOutput: this.debug.bind(this) });
|
package/dist/plugin.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;AAsCA;;;;;;cAAa,MAAA,oBACM,0BAAA,GAA6B,0BAAA,EAE9C,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/plugin.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../src/plugin.ts"],"mappings":";;;;;;;AAsCA;;;;;;cAAa,MAAA,oBACM,0BAAA,GAA6B,0BAAA,EAE9C,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
|
package/dist/plugin.mjs
CHANGED
|
@@ -41,7 +41,13 @@ const plugin = (options = {}) => {
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
await this.pulumi.workspace.installPlugin("terraform-provider", "v1.0.2");
|
|
44
|
-
if (this.config.pulumi.
|
|
44
|
+
if (this.config.pulumi.stackSettings && Object.keys(this.config.pulumi.stackSettings).length > 0) await this.pulumi.workspace.saveStackSettings(this.pulumi.name, this.config.pulumi.stackSettings);
|
|
45
|
+
await this.pulumi.workspace.saveProjectSettings(defu(this.config.pulumi.projectSettings ?? {}, {
|
|
46
|
+
name: this.config.name,
|
|
47
|
+
runtime: { name: "nodejs" },
|
|
48
|
+
description: this.config.description,
|
|
49
|
+
author: this.config.organization
|
|
50
|
+
}));
|
|
45
51
|
this.info(`Deploying Pulumi stack: ${this.config.pulumi.stackName}`);
|
|
46
52
|
await this.pulumi.refresh({ onOutput: this.debug.bind(this) });
|
|
47
53
|
if (this.config.pulumi.destroy) await this.pulumi.destroy({ onOutput: this.debug.bind(this) });
|
package/dist/plugin.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.mjs","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n fullyQualifiedStackName,\n LocalWorkspace\n} from \"@pulumi/pulumi/automation\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { getOrganizationName, getWorkspaceName } from \"powerlines/plugin-utils\";\nimport { UNSAFE_PulumiPluginContext } from \"./types/_internal\";\nimport { PulumiPluginOptions } from \"./types/plugin\";\n\n/**\n * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Pulumi IaC.\n *\n * @see https://www.pulumi.com\n *\n * @param options - The Pulumi plugin user configuration options.\n * @returns A Powerlines plugin to configure infrastructure and deploy a project using Pulumi.\n */\nexport const plugin = <\n TContext extends UNSAFE_PulumiPluginContext = UNSAFE_PulumiPluginContext\n>(\n options: PulumiPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"pulumi\",\n async config() {\n return {\n deploy: {\n pulumi: defu(options, {\n projectName: this.config.name,\n settings: {}\n })\n }\n };\n },\n async configResolved() {\n const organizationName = kebabCase(getOrganizationName(this));\n const workspaceName = kebabCase(getWorkspaceName(this));\n const projectName = kebabCase(this.config.name);\n\n this.config.pulumi.stackName ??= fullyQualifiedStackName(\n organizationName || workspaceName || projectName,\n `${\n workspaceName &&\n workspaceName !== organizationName &&\n workspaceName !== projectName\n ? `${workspaceName}-`\n : \"\"\n }${projectName}`,\n this.config.mode\n );\n },\n async deploy() {\n this.info(\n `Creating resources for Pulumi stack: ${this.config.pulumi.stackName}`\n );\n\n this.pulumi ??= await LocalWorkspace.createOrSelectStack({\n ...(this.config.pulumi as Parameters<\n typeof LocalWorkspace.createOrSelectStack\n >[0]),\n program: async () => {\n this.debug(\n \"Executing Pulumi program to define infrastructure resources.\"\n );\n\n await this.$$internal.callHook(\"deployPulumi\", {\n sequential: true,\n result: \"merge\"\n });\n\n this.debug(\n \"Pulumi program execution completed. Resources have been defined.\"\n );\n }\n });\n await this.pulumi.workspace.installPlugin(\n \"terraform-provider\",\n \"v1.0.2\"\n );\n\n if (\n this.config.pulumi.
|
|
1
|
+
{"version":3,"file":"plugin.mjs","names":[],"sources":["../src/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n fullyQualifiedStackName,\n LocalWorkspace,\n ProjectSettings\n} from \"@pulumi/pulumi/automation\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { getOrganizationName, getWorkspaceName } from \"powerlines/plugin-utils\";\nimport { UNSAFE_PulumiPluginContext } from \"./types/_internal\";\nimport { PulumiPluginOptions } from \"./types/plugin\";\n\n/**\n * A package containing a Powerlines plugin to configure infrastructure and deploy a project using Pulumi IaC.\n *\n * @see https://www.pulumi.com\n *\n * @param options - The Pulumi plugin user configuration options.\n * @returns A Powerlines plugin to configure infrastructure and deploy a project using Pulumi.\n */\nexport const plugin = <\n TContext extends UNSAFE_PulumiPluginContext = UNSAFE_PulumiPluginContext\n>(\n options: PulumiPluginOptions = {}\n): Plugin<TContext>[] => {\n return [\n {\n name: \"pulumi\",\n async config() {\n return {\n deploy: {\n pulumi: defu(options, {\n projectName: this.config.name,\n settings: {}\n })\n }\n };\n },\n async configResolved() {\n const organizationName = kebabCase(getOrganizationName(this));\n const workspaceName = kebabCase(getWorkspaceName(this));\n const projectName = kebabCase(this.config.name);\n\n this.config.pulumi.stackName ??= fullyQualifiedStackName(\n organizationName || workspaceName || projectName,\n `${\n workspaceName &&\n workspaceName !== organizationName &&\n workspaceName !== projectName\n ? `${workspaceName}-`\n : \"\"\n }${projectName}`,\n this.config.mode\n );\n },\n async deploy() {\n this.info(\n `Creating resources for Pulumi stack: ${this.config.pulumi.stackName}`\n );\n\n this.pulumi ??= await LocalWorkspace.createOrSelectStack({\n ...(this.config.pulumi as Parameters<\n typeof LocalWorkspace.createOrSelectStack\n >[0]),\n program: async () => {\n this.debug(\n \"Executing Pulumi program to define infrastructure resources.\"\n );\n\n await this.$$internal.callHook(\"deployPulumi\", {\n sequential: true,\n result: \"merge\"\n });\n\n this.debug(\n \"Pulumi program execution completed. Resources have been defined.\"\n );\n }\n });\n await this.pulumi.workspace.installPlugin(\n \"terraform-provider\",\n \"v1.0.2\"\n );\n\n if (\n this.config.pulumi.stackSettings &&\n Object.keys(this.config.pulumi.stackSettings).length > 0\n ) {\n await this.pulumi.workspace.saveStackSettings(\n this.pulumi.name,\n this.config.pulumi.stackSettings\n );\n }\n\n await this.pulumi.workspace.saveProjectSettings(\n defu(this.config.pulumi.projectSettings ?? {}, {\n name: this.config.name,\n runtime: { name: \"nodejs\" },\n description: this.config.description,\n author: this.config.organization\n }) as ProjectSettings\n );\n\n this.info(`Deploying Pulumi stack: ${this.config.pulumi.stackName}`);\n\n await this.pulumi.refresh({ onOutput: this.debug.bind(this) });\n\n if (this.config.pulumi.destroy) {\n await this.pulumi.destroy({\n onOutput: this.debug.bind(this)\n });\n }\n\n const result = await this.pulumi.up({\n onOutput: this.debug.bind(this)\n });\n\n this.info(\n `Successfully deployed ${this.pulumi.name} (v${\n result.summary.version\n }): ${result.summary.message}`\n );\n }\n }\n ] as Plugin<TContext>[];\n};\n\nexport default plugin;\n"],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KAAK,2BAA2B,KAAK,OAAO,OAAO,YAAY;AAEpE,SAAM,KAAK,OAAO,QAAQ,EAAE,UAAU,KAAK,MAAM,KAAK,KAAK,EAAE,CAAC;AAE9D,OAAI,KAAK,OAAO,OAAO,QACrB,OAAM,KAAK,OAAO,QAAQ,EACxB,UAAU,KAAK,MAAM,KAAK,KAAK,EAChC,CAAC;GAGJ,MAAM,SAAS,MAAM,KAAK,OAAO,GAAG,EAClC,UAAU,KAAK,MAAM,KAAK,KAAK,EAChC,CAAC;AAEF,QAAK,KACH,yBAAyB,KAAK,OAAO,KAAK,KACxC,OAAO,QAAQ,QAChB,KAAK,OAAO,QAAQ,UACtB;;EAEJ,CACF"}
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
2
|
-
import { InlineProgramArgs, LocalWorkspaceOptions, Stack, StackSettings } from "@pulumi/pulumi/automation";
|
|
2
|
+
import { InlineProgramArgs, LocalWorkspaceOptions, ProjectSettings, Stack, StackSettings } from "@pulumi/pulumi/automation";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
5
|
interface PulumiPluginOptions extends Partial<InlineProgramArgs> {
|
|
@@ -16,7 +16,11 @@ interface PulumiPluginOptions extends Partial<InlineProgramArgs> {
|
|
|
16
16
|
/**
|
|
17
17
|
* Additional stack settings.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
stackSettings?: StackSettings;
|
|
20
|
+
/**
|
|
21
|
+
* Additional project settings.
|
|
22
|
+
*/
|
|
23
|
+
projectSettings?: Partial<ProjectSettings>;
|
|
20
24
|
}
|
|
21
25
|
interface PulumiPluginUserConfig extends UserConfig {
|
|
22
26
|
pulumi?: PulumiPluginOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UA2BiB,mBAAA,SAA4B,OAAA,CAAQ,iBAAA;;AAArD;;EAIE,OAAA,GAAU,qBAAA;EAJyC;;;;;EAWnD,OAAA;EAXkD;;;EAgBlD,aAAA,GAAgB,aAAA;EAZhB;;;EAiBA,eAAA,GAAkB,OAAA,CAAQ,eAAA;AAAA;AAAA,UAGX,sBAAA,SAA+B,UAAA;EAC9C,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAA;EAClD,MAAA,EAAQ,mBAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;EAChB,MAAA,EAAQ,KAAA;AAAA;AAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InlineProgramArgs, LocalWorkspaceOptions, Stack, StackSettings } from "@pulumi/pulumi/automation";
|
|
1
|
+
import { InlineProgramArgs, LocalWorkspaceOptions, ProjectSettings, Stack, StackSettings } from "@pulumi/pulumi/automation";
|
|
2
2
|
import { PluginContext, ResolvedConfig, UserConfig } from "powerlines";
|
|
3
3
|
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
@@ -16,7 +16,11 @@ interface PulumiPluginOptions extends Partial<InlineProgramArgs> {
|
|
|
16
16
|
/**
|
|
17
17
|
* Additional stack settings.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
stackSettings?: StackSettings;
|
|
20
|
+
/**
|
|
21
|
+
* Additional project settings.
|
|
22
|
+
*/
|
|
23
|
+
projectSettings?: Partial<ProjectSettings>;
|
|
20
24
|
}
|
|
21
25
|
interface PulumiPluginUserConfig extends UserConfig {
|
|
22
26
|
pulumi?: PulumiPluginOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;UA2BiB,mBAAA,SAA4B,OAAA,CAAQ,iBAAA;;AAArD;;EAIE,OAAA,GAAU,qBAAA;EAJyC;;;;;EAWnD,OAAA;EAXkD;;;EAgBlD,aAAA,GAAgB,aAAA;EAZhB;;;EAiBA,eAAA,GAAkB,OAAA,CAAQ,eAAA;AAAA;AAAA,UAGX,sBAAA,SAA+B,UAAA;EAC9C,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAA;EAClD,MAAA,EAAQ,mBAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;EAChB,MAAA,EAAQ,KAAA;AAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-pulumi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A Powerlines plugin to transform source code to be platform agnostic using pulumi.",
|
|
6
6
|
"keywords": ["pulumi", "powerlines", "storm-software", "powerlines-plugin"],
|
|
@@ -126,13 +126,13 @@
|
|
|
126
126
|
"@stryke/type-checks": "^0.5.41",
|
|
127
127
|
"@stryke/types": "^0.11.1",
|
|
128
128
|
"defu": "^6.1.4",
|
|
129
|
-
"powerlines": "^0.
|
|
129
|
+
"powerlines": "^0.42.1",
|
|
130
130
|
"typescript": "^5.9.3"
|
|
131
131
|
},
|
|
132
132
|
"devDependencies": {
|
|
133
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
133
|
+
"@powerlines/plugin-plugin": "^0.12.311",
|
|
134
134
|
"@types/node": "^25.5.0"
|
|
135
135
|
},
|
|
136
136
|
"publishConfig": { "access": "public" },
|
|
137
|
-
"gitHead": "
|
|
137
|
+
"gitHead": "b5648a6f230600a4f99ab425034a18e912ad95eb"
|
|
138
138
|
}
|