@powerlines/plugin-pulumi 0.2.281 → 0.2.283
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.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -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} from \"@pulumi/pulumi/automation\";\nimport { omit } from \"@stryke/helpers\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { getOrganizationName, getWorkspaceName } from \"powerlines/plugin-utils\";\nimport {\n PulumiPluginContext,\n PulumiPluginCreateStackInlineOptions,\n PulumiPluginCreateStackLocalOptions,\n PulumiPluginCreateStackOptions,\n PulumiPluginExistingStackOptions,\n PulumiPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n
|
|
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} from \"@pulumi/pulumi/automation\";\nimport { omit } from \"@stryke/helpers\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport defu from \"defu\";\nimport { Plugin } from \"powerlines\";\nimport { getOrganizationName, getWorkspaceName } from \"powerlines/plugin-utils\";\nimport {\n PulumiPluginContext,\n PulumiPluginCreateStackInlineOptions,\n PulumiPluginCreateStackLocalOptions,\n PulumiPluginCreateStackOptions,\n PulumiPluginExistingStackOptions,\n PulumiPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n pulumi?: PulumiPluginOptions;\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 name: \"pulumi\",\n async config() {\n return {\n deploy: {\n pulumi: defu(options, {\n projectName: this.config.name,\n workDir: joinPaths(this.artifactsPath, \"infrastructure\"),\n settings: {}\n })\n }\n };\n },\n async configResolved() {\n if (!(options as PulumiPluginExistingStackOptions).stack) {\n (this.config.pulumi as PulumiPluginCreateStackOptions).stackName ??=\n fullyQualifiedStackName(\n kebabCase(getOrganizationName(this) || \"default\"),\n `${\n getWorkspaceName(this)\n ? `${kebabCase(getWorkspaceName(this))}-`\n : \"\"\n }${kebabCase(this.config.name)}`,\n this.config.mode\n );\n }\n },\n deploy: {\n order: \"post\",\n async handler() {\n this.info(\n `Deploying Pulumi stack: ${\n (this.config.pulumi as PulumiPluginExistingStackOptions).stack\n ?.name ||\n (this.config.pulumi as PulumiPluginCreateStackOptions).stackName\n }`\n );\n\n if (\n (!(options as PulumiPluginExistingStackOptions).stack &&\n !(options as PulumiPluginCreateStackInlineOptions).program &&\n !(options as PulumiPluginCreateStackInlineOptions).projectName) ||\n !(options as PulumiPluginCreateStackLocalOptions).workDir\n ) {\n throw new Error(\n `Pulumi plugin requires either an inline program or a working directory to be specified.`\n );\n }\n\n let stack = (options as PulumiPluginExistingStackOptions).stack;\n stack ??= await LocalWorkspace.createOrSelectStack(\n omit(this.config.pulumi as PulumiPluginCreateStackOptions, [\n \"options\",\n \"settings\"\n ]) as Parameters<typeof LocalWorkspace.createOrSelectStack>[0]\n );\n\n if (\n this.config.pulumi.settings &&\n Object.keys(this.config.pulumi.settings).length > 0\n ) {\n await stack.workspace.saveStackSettings(\n stack.name,\n this.config.pulumi.settings\n );\n }\n\n await stack.refresh({ onOutput: this.debug.bind(this) });\n\n if (this.config.pulumi.destroy) {\n await stack.destroy({ onOutput: this.debug.bind(this) });\n }\n\n const result = await stack.up({\n onOutput: this.debug.bind(this)\n });\n\n this.info(\n `Successfully deployed ${stack.name} (v${result.summary.version}): ${result.summary.message}`\n );\n }\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AAqDA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,MAAM,SAAS;AACb,UAAO,EACL,QAAQ,EACN,QAAQ,KAAK,SAAS;IACpB,aAAa,KAAK,OAAO;IACzB,SAAS,UAAU,KAAK,eAAe,iBAAiB;IACxD,UAAU,EAAE;IACb,CAAC,EACH,EACF;;EAEH,MAAM,iBAAiB;AACrB,OAAI,CAAE,QA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
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to transform source code to be platform agnostic using pulumi.",
|
|
6
6
|
"repository": {
|
|
@@ -97,14 +97,14 @@
|
|
|
97
97
|
"@stryke/type-checks": "^0.5.25",
|
|
98
98
|
"@stryke/types": "^0.10.39",
|
|
99
99
|
"defu": "^6.1.4",
|
|
100
|
-
"powerlines": "^0.39.
|
|
100
|
+
"powerlines": "^0.39.11",
|
|
101
101
|
"typescript": "^5.9.3"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
104
|
+
"@powerlines/plugin-plugin": "^0.12.254",
|
|
105
105
|
"@types/node": "^25.3.3"
|
|
106
106
|
},
|
|
107
107
|
"publishConfig": { "access": "public" },
|
|
108
108
|
"types": "./dist/index.d.cts",
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "e63eb5a0ecd0e5ee3e030388ad1c534b3ecb2136"
|
|
110
110
|
}
|