@powerlines/plugin-pulumi 0.6.225 → 0.6.227

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;YAkCY,MAAA;IACR,MAAA,GAAS,mBAAA;EAAA;EAAA,UAGD,UAAA,kBAA4B,aAAA;IACpC,MAAA;MADoC;;;;;;;MASlC,MAAA,IACE,IAAA,EAAM,QAAA,EACN,SAAA,GAAY,kBAAA,KACT,YAAA,CAAa,kBAAA;IAAA;EAAA;AAAA;;;;;;;;;cAaX,MAAA,oBACM,mBAAA,GAAsB,mBAAA,EAEvC,OAAA,GAAS,mBAAA,KACR,MAAA,CAAO,QAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.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 { MaybePromise } from \"@stryke/types/base\";\nimport defu from \"defu\";\nimport { Plugin, PluginContext } from \"powerlines\";\nimport { getOrganizationName, getWorkspaceName } from \"powerlines/plugin-utils\";\nimport { PulumiPluginContext, PulumiPluginOptions } from \"./types/plugin\";\nimport { DeployPulumiResult, PulumiOutputRecord } from \"./types/pulumi\";\n\nexport type * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n pulumi?: PulumiPluginOptions;\n }\n\n interface BasePlugin<TContext extends PluginContext> {\n pulumi?: {\n /**\n * A hook that can be implemented to deploy Pulumi resources after the main build process. This allows you to define and manage your infrastructure as code using Pulumi, directly from your Powerlines plugin.\n *\n * @param this - The plugin context.\n * @param resources - An object containing the Pulumi resources' outputs that were added in earlier hook invocations.\n * @returns Optionally, the resources' outputs that were added during the Pulumi deployment that will be passed to the next hook invocation.\n */\n deploy?: (\n this: TContext,\n resources?: PulumiOutputRecord\n ) => MaybePromise<DeployPulumiResult>;\n };\n }\n}\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 PulumiPluginContext = 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(await getOrganizationName(this));\n const workspaceName = kebabCase(await 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 const resources = {} as PulumiOutputRecord;\n await this.callHook(\n \"pulumi:deploy\",\n {\n sequential: true,\n result: \"merge\"\n },\n resources\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 || this.config.name\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"],"mappings":";;;;;;;;;;;;;;AA+DA,MAAa,UAGX,UAA+B,CAAC,MACT;CACvB,OAAO,CACL;EACE,MAAM;EACN,MAAM,SAAS;GACb,OAAO,EACL,QAAQ,EACN,QAAQ,KAAK,SAAS;IACpB,aAAa,KAAK,OAAO;IACzB,UAAU,CAAC;GACb,CAAC,EACH,EACF;EACF;EACA,MAAM,iBAAiB;GACrB,MAAM,mBAAmB,UAAU,MAAM,oBAAoB,IAAI,CAAC;GAClE,MAAM,gBAAgB,UAAU,MAAM,iBAAiB,IAAI,CAAC;GAC5D,MAAM,cAAc,UAAU,KAAK,OAAO,IAAI;GAE9C,KAAK,OAAO,OAAO,cAAc,wBAC/B,oBAAoB,iBAAiB,aAC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,SACvB;EACF;CACF,CACF;AACF"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
@@ -1 +1 @@
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,UAAU;EACxD,MAAA,GAAS,mBAAA;AAAA;AAAA,UAGM,0BAAA,SAAmC,cAAc;EAChE,MAAA,EAAQ,mBAAA;AAAA;AAAA,KAGE,mBAAA,yBACc,0BAAA,GACtB,0BAAA,IACA,aAAA,CAAc,eAAA;EAChB,MAAA,EAAQ,KAAA;AAAA"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"pulumi.d.mts","names":[],"sources":["../../src/types/pulumi.ts"],"mappings":";;;UAoBiB,kBAAA;EAAA,CACd,GAAA,WAAc,MAAA,CAAO,CAAA,IAAK,kBAAA,CAAmB,CAAA,IAAK,kBAAA,CAAmB,CAAA;AAAA;AAAA,KAG5D,kBAAA,GAAqB,MAAM"}
1
+ {"version":3,"file":"pulumi.d.mts","names":[],"sources":["../../src/types/pulumi.ts"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-pulumi",
3
- "version": "0.6.225",
3
+ "version": "0.6.227",
4
4
  "private": false,
5
5
  "description": "A Powerlines plugin to deploy infrastructure using Pulumi.",
6
6
  "keywords": ["pulumi", "powerlines", "storm-software", "powerlines-plugin"],
@@ -112,13 +112,13 @@
112
112
  "@stryke/type-checks": "^0.6.17",
113
113
  "@stryke/types": "^0.12.12",
114
114
  "defu": "^6.1.7",
115
- "powerlines": "^0.47.123",
115
+ "powerlines": "^0.47.125",
116
116
  "typescript": "^6.0.3"
117
117
  },
118
118
  "devDependencies": {
119
- "@powerlines/plugin-plugin": "^0.12.535",
119
+ "@powerlines/plugin-plugin": "^0.12.537",
120
120
  "@types/node": "^25.9.1"
121
121
  },
122
122
  "publishConfig": { "access": "public" },
123
- "gitHead": "f8de1000ffda8a49be7fccbb6f53890449f7bdd3"
123
+ "gitHead": "30ba301952db7af53c07d369bd22f650e5ca9c45"
124
124
  }