@storm-software/pulumi-tools 0.6.0 → 0.7.0

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 (95) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/chunk-23KFTIT2.mjs +0 -0
  3. package/dist/chunk-3GQAWCBQ.js +13 -0
  4. package/dist/chunk-3I666OI5.js +17 -0
  5. package/dist/chunk-4BDVESFO.mjs +109 -0
  6. package/dist/chunk-53MF6VMZ.js +18 -0
  7. package/dist/chunk-A6SQY5H3.js +16 -0
  8. package/dist/chunk-AJZ5SHGR.js +15 -0
  9. package/dist/chunk-ANLNSAGB.mjs +16 -0
  10. package/dist/chunk-CA7S5MOH.mjs +0 -0
  11. package/dist/chunk-CFSEZM76.js +13 -0
  12. package/dist/chunk-DBLK3NPE.js +20 -0
  13. package/dist/chunk-DFO7BOCT.js +35 -0
  14. package/dist/chunk-F6BX5YBK.mjs +15 -0
  15. package/dist/chunk-FLIBLJZ5.mjs +4586 -0
  16. package/dist/chunk-GTCRGRK2.mjs +20 -0
  17. package/dist/chunk-GUQOEBFW.js +1 -0
  18. package/dist/chunk-LZVNTYR3.js +109 -0
  19. package/dist/chunk-N2YKXZ5R.js +1 -0
  20. package/dist/chunk-QWZKKPML.mjs +18 -0
  21. package/dist/chunk-U64WWLJ7.mjs +35 -0
  22. package/dist/chunk-UV4HQO3Y.mjs +0 -0
  23. package/dist/chunk-XO62WWX4.js +1 -0
  24. package/dist/chunk-XUV4U54K.mjs +21 -0
  25. package/dist/chunk-XVKT7UGE.mjs +13 -0
  26. package/dist/chunk-Z2BSLIJ7.js +4585 -0
  27. package/dist/chunk-Z7XF6QIZ.mjs +17 -0
  28. package/dist/executors.d.mts +10 -0
  29. package/dist/executors.d.ts +10 -0
  30. package/dist/executors.js +9 -0
  31. package/dist/executors.mjs +9 -0
  32. package/dist/generators-Bk-gnn2s.d.ts +30 -0
  33. package/dist/generators-kdwvS-eX.d.mts +30 -0
  34. package/dist/generators.d.mts +5 -0
  35. package/dist/generators.d.ts +5 -0
  36. package/dist/generators.js +10 -0
  37. package/dist/generators.mjs +10 -0
  38. package/dist/index.d.mts +12 -0
  39. package/dist/index.d.ts +12 -0
  40. package/dist/index.js +26 -0
  41. package/dist/index.mjs +26 -0
  42. package/dist/schema.d-0Y4jyHfI.d.ts +11 -0
  43. package/dist/schema.d-BBpw11tM.d.ts +8 -0
  44. package/dist/schema.d-BCkJFwHO.d.mts +11 -0
  45. package/dist/schema.d-BTpgEb0Q.d.mts +8 -0
  46. package/dist/schema.d-C3zluSfr.d.mts +7 -0
  47. package/dist/schema.d-CWp7y_9i.d.mts +8 -0
  48. package/dist/schema.d-D2EQU5UL.d.mts +11 -0
  49. package/dist/schema.d-DhkOAnzb.d.ts +8 -0
  50. package/dist/schema.d-Dri9rCeV.d.ts +11 -0
  51. package/dist/schema.d-i8onVGak.d.ts +7 -0
  52. package/dist/src/base/base-executor.d.mts +44 -0
  53. package/dist/src/base/base-executor.d.ts +44 -0
  54. package/dist/src/base/base-executor.js +8 -0
  55. package/dist/src/base/base-executor.mjs +8 -0
  56. package/dist/src/base/index.d.mts +6 -0
  57. package/dist/src/base/index.d.ts +6 -0
  58. package/dist/src/base/index.js +15 -0
  59. package/dist/src/base/index.mjs +15 -0
  60. package/dist/src/base/providers.d.mts +8 -0
  61. package/dist/src/base/providers.d.ts +8 -0
  62. package/dist/src/base/providers.js +9 -0
  63. package/dist/src/base/providers.mjs +9 -0
  64. package/dist/src/executors/config/executor.d.mts +12 -0
  65. package/dist/src/executors/config/executor.d.ts +12 -0
  66. package/dist/src/executors/config/executor.js +9 -0
  67. package/dist/src/executors/config/executor.mjs +9 -0
  68. package/dist/src/executors/import/executor.d.mts +12 -0
  69. package/dist/src/executors/import/executor.d.ts +12 -0
  70. package/dist/src/executors/import/executor.js +9 -0
  71. package/dist/src/executors/import/executor.mjs +9 -0
  72. package/dist/src/executors/preview/executor.d.mts +12 -0
  73. package/dist/src/executors/preview/executor.d.ts +12 -0
  74. package/dist/src/executors/preview/executor.js +9 -0
  75. package/dist/src/executors/preview/executor.mjs +9 -0
  76. package/dist/src/executors/refresh/executor.d.mts +12 -0
  77. package/dist/src/executors/refresh/executor.d.ts +12 -0
  78. package/dist/src/executors/refresh/executor.js +9 -0
  79. package/dist/src/executors/refresh/executor.mjs +9 -0
  80. package/dist/src/executors/up/executor.d.mts +12 -0
  81. package/dist/src/executors/up/executor.d.ts +12 -0
  82. package/dist/src/executors/up/executor.js +9 -0
  83. package/dist/src/executors/up/executor.mjs +9 -0
  84. package/dist/src/generators/init/generator.d.mts +5 -0
  85. package/dist/src/generators/init/generator.d.ts +5 -0
  86. package/dist/src/generators/init/generator.js +11 -0
  87. package/dist/src/generators/init/generator.mjs +11 -0
  88. package/dist/src/generators/init/schema.d.ts +1 -1
  89. package/dist/tsup.config.d.mts +5 -0
  90. package/dist/tsup.config.d.ts +5 -0
  91. package/dist/tsup.config.js +34 -0
  92. package/dist/tsup.config.mjs +34 -0
  93. package/dist/types-CIJRaFHD.d.mts +1185 -0
  94. package/dist/types-CIJRaFHD.d.ts +1185 -0
  95. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 0.7.0 (2025-01-20)
2
+
3
+ ### Features
4
+
5
+ - **untyped:** Standard file name changes to avoid collisions ([71acf100](https://github.com/storm-software/storm-ops/commit/71acf100))
6
+
7
+ ### Bug Fixes
8
+
9
+ - **pulumi-tools:** Resolved issue with invalid import paths ([af7e7c5e](https://github.com/storm-software/storm-ops/commit/af7e7c5e))
10
+ - **workspace-tools:** Resolved issues with import paths ([9eeb1f73](https://github.com/storm-software/storm-ops/commit/9eeb1f73))
11
+
1
12
  ## 0.6.0 (2025-01-20)
2
13
 
3
14
  ### Features
File without changes
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
+ }) : x)(function(x) {
6
+ if (typeof require !== "undefined") return require.apply(this, arguments);
7
+ throw Error('Dynamic require of "' + x + '" is not supported');
8
+ });
9
+
10
+
11
+
12
+
13
+ exports.__name = __name; exports.__require = __require;
@@ -0,0 +1,17 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDFO7BOCTjs = require('./chunk-DFO7BOCT.js');
4
+
5
+ // src/executors/config/executor.ts
6
+ var executor_default = _chunkDFO7BOCTjs.withPulumiExecutor.call(void 0, "config", (options) => [
7
+ options.action,
8
+ options.showSecrets && `--show-secrets`,
9
+ options.secret && `--secret`,
10
+ options.path && `--path`,
11
+ options.name && options.value && `"${options.name}" "${options.value}"`,
12
+ options.stack && `--stack=${options.stack}`
13
+ ]);
14
+
15
+
16
+
17
+ exports.executor_default = executor_default;
@@ -0,0 +1,109 @@
1
+ import {
2
+ getCloudTemplateName
3
+ } from "./chunk-GTCRGRK2.mjs";
4
+ import {
5
+ initGenerator,
6
+ run,
7
+ withRunGenerator
8
+ } from "./chunk-FLIBLJZ5.mjs";
9
+ import {
10
+ __name
11
+ } from "./chunk-XUV4U54K.mjs";
12
+
13
+ // src/generators/init/generator.ts
14
+ import { addDependenciesToPackageJson, addProjectConfiguration, formatFiles, readJsonFile, runTasksInSerial } from "@nx/devkit";
15
+ import { readFileSync, unlinkSync } from "node:fs";
16
+ import { join } from "node:path";
17
+ async function initGeneratorFn(tree, options, config) {
18
+ const task = initGenerator(tree, options);
19
+ addProjectConfiguration(tree, options.name || "deployment", {
20
+ root: options.directory || "./deployment",
21
+ projectType: "application",
22
+ sourceRoot: options.directory || "./deployment",
23
+ targets: {
24
+ up: {
25
+ executor: "@nx-extend/pulumi:up",
26
+ options: {}
27
+ },
28
+ preview: {
29
+ executor: "@nx-extend/pulumi:preview",
30
+ options: {}
31
+ },
32
+ refresh: {
33
+ executor: "@nx-extend/pulumi:refresh",
34
+ options: {}
35
+ },
36
+ import: {
37
+ executor: "@nx-extend/pulumi:import",
38
+ options: {}
39
+ }
40
+ },
41
+ tags: [
42
+ "infra:pulumi"
43
+ ]
44
+ });
45
+ await runTasksInSerial(generateNewPulumiProject(tree, options, config), loginToPulumi(tree, options, config), addPulumiDeps(tree, options), cleanupProject(tree, options))();
46
+ if (!options.skipFormat) {
47
+ await formatFiles(tree);
48
+ }
49
+ return task;
50
+ }
51
+ __name(initGeneratorFn, "initGeneratorFn");
52
+ var generator_default = withRunGenerator("Initialize Storm Pulumi workspace", initGeneratorFn);
53
+ function generateNewPulumiProject(tree, options, config) {
54
+ return () => {
55
+ const template = getCloudTemplateName(options.provider);
56
+ run(config, [
57
+ `pulumi new ${template}`,
58
+ `--name=${options.name || "deployment"}`,
59
+ `--dir=${options.directory || "./deployment"}`,
60
+ options.secretsProvider && `--secrets-provider=${options.secretsProvider}`,
61
+ "--generate-only",
62
+ "--yes",
63
+ "--force"
64
+ ].filter(Boolean).join(" "), join(config.workspaceRoot, options.directory || "./deployment"), "inherit");
65
+ };
66
+ }
67
+ __name(generateNewPulumiProject, "generateNewPulumiProject");
68
+ function loginToPulumi(tree, options, config) {
69
+ return () => {
70
+ if (!options.login) {
71
+ return;
72
+ }
73
+ if (options.login.startsWith("file://")) {
74
+ options.login = `file://${tree.root}/${options.directory || "./deployment"}/${options.login.replace("file://", "")}`;
75
+ }
76
+ run(config, [
77
+ "pulumi login",
78
+ options.login
79
+ ].filter(Boolean).join(" "), join(config.workspaceRoot, options.directory || "./deployment"), "inherit", {
80
+ ...process.env,
81
+ PULUMI_EXPERIMENTAL: "true"
82
+ });
83
+ };
84
+ }
85
+ __name(loginToPulumi, "loginToPulumi");
86
+ function addPulumiDeps(tree, options) {
87
+ return () => {
88
+ const packageJson = readJsonFile(`${options.directory}/package.json`);
89
+ if (packageJson) {
90
+ addDependenciesToPackageJson(tree, {}, packageJson.dependencies || {})();
91
+ }
92
+ };
93
+ }
94
+ __name(addPulumiDeps, "addPulumiDeps");
95
+ function cleanupProject(tree, options) {
96
+ return () => {
97
+ const indexTsLocation = join(tree.root, `${options.directory || "./deployment"}/index.ts`);
98
+ tree.write(`${options.directory}/pulumi.ts`, readFileSync(indexTsLocation).toString());
99
+ unlinkSync(join(tree.root, `${options.directory || "./deployment"}/.gitignore`));
100
+ unlinkSync(join(tree.root, `${options.directory || "./deployment"}/package.json`));
101
+ unlinkSync(join(tree.root, `${options.directory || "./deployment"}/tsconfig.json`));
102
+ };
103
+ }
104
+ __name(cleanupProject, "cleanupProject");
105
+
106
+ export {
107
+ initGeneratorFn,
108
+ generator_default
109
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDFO7BOCTjs = require('./chunk-DFO7BOCT.js');
4
+
5
+ // src/executors/up/executor.ts
6
+ var executor_default = _chunkDFO7BOCTjs.withPulumiExecutor.call(void 0, "up", (options) => [
7
+ "--suppress-progress",
8
+ options.stack && `--stack=${options.stack}`,
9
+ options.skipPreview && "--skip-preview",
10
+ options.yes && "--yes",
11
+ options.suppressOutputs && "--suppress-outputs",
12
+ options.debug && "--debug",
13
+ options.json && "--json"
14
+ ]);
15
+
16
+
17
+
18
+ exports.executor_default = executor_default;
@@ -0,0 +1,16 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDFO7BOCTjs = require('./chunk-DFO7BOCT.js');
4
+
5
+ // src/executors/import/executor.ts
6
+ var executor_default = _chunkDFO7BOCTjs.withPulumiExecutor.call(void 0, "import", (options) => [
7
+ options.target,
8
+ options.name,
9
+ options.id,
10
+ options.parent && `--parent 'parent=${options.parent}'`,
11
+ options.stack && `--stack=${options.stack}`
12
+ ]);
13
+
14
+
15
+
16
+ exports.executor_default = executor_default;
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDFO7BOCTjs = require('./chunk-DFO7BOCT.js');
4
+
5
+ // src/executors/refresh/executor.ts
6
+ var executor_default = _chunkDFO7BOCTjs.withPulumiExecutor.call(void 0, "refresh", (options) => [
7
+ "--suppress-progress",
8
+ options.stack && `--stack=${options.stack}`,
9
+ options.skipPreview && "--skip-preview",
10
+ options.yes && "--yes"
11
+ ]);
12
+
13
+
14
+
15
+ exports.executor_default = executor_default;
@@ -0,0 +1,16 @@
1
+ import {
2
+ withPulumiExecutor
3
+ } from "./chunk-U64WWLJ7.mjs";
4
+
5
+ // src/executors/import/executor.ts
6
+ var executor_default = withPulumiExecutor("import", (options) => [
7
+ options.target,
8
+ options.name,
9
+ options.id,
10
+ options.parent && `--parent 'parent=${options.parent}'`,
11
+ options.stack && `--stack=${options.stack}`
12
+ ]);
13
+
14
+ export {
15
+ executor_default
16
+ };
File without changes
@@ -0,0 +1,13 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkDFO7BOCTjs = require('./chunk-DFO7BOCT.js');
4
+
5
+ // src/executors/preview/executor.ts
6
+ var executor_default = _chunkDFO7BOCTjs.withPulumiExecutor.call(void 0, "preview", (options) => [
7
+ options.stack && `--stack=${options.stack}`,
8
+ options.expectNoChanges && "--expect-no-changes"
9
+ ]);
10
+
11
+
12
+
13
+ exports.executor_default = executor_default;
@@ -0,0 +1,20 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
4
+
5
+ // src/base/providers.ts
6
+ var Provider;
7
+ (function(Provider2) {
8
+ Provider2["AWS"] = "aws";
9
+ Provider2["AZURE"] = "azure";
10
+ Provider2["GOOGLE_CLOUD_PLATFORM"] = "gcp";
11
+ })(Provider || (Provider = exports.Provider = {}));
12
+ function getCloudTemplateName(cloudProvider) {
13
+ return `${cloudProvider}-typescript`;
14
+ }
15
+ _chunk3GQAWCBQjs.__name.call(void 0, getCloudTemplateName, "getCloudTemplateName");
16
+
17
+
18
+
19
+
20
+ exports.Provider = Provider; exports.getCloudTemplateName = getCloudTemplateName;
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+
4
+ var _chunkZ2BSLIJ7js = require('./chunk-Z2BSLIJ7.js');
5
+
6
+
7
+ var _chunk3GQAWCBQjs = require('./chunk-3GQAWCBQ.js');
8
+
9
+ // src/base/base-executor.ts
10
+ var _path = require('path');
11
+ var _shelljs = require('shelljs');
12
+ var withPulumiExecutor = /* @__PURE__ */ _chunk3GQAWCBQjs.__name.call(void 0, (command, argsMapper, executorOptions = {}) => async (_options, context) => {
13
+ return _chunkZ2BSLIJ7js.withRunExecutor.call(void 0, `Pulumi \`${command}\` Command Executor`, async (options, context2, config) => {
14
+ if (!_shelljs.which.call(void 0, "pulumi")) {
15
+ throw new Error("Pulumi is not installed. Please install it before running this executor.");
16
+ }
17
+ if (!_optionalChain([context2, 'access', _ => _.projectsConfigurations, 'optionalAccess', _2 => _2.projects]) || !context2.projectName || !context2.projectsConfigurations.projects[context2.projectName]) {
18
+ throw new Error("The Build process failed because the context is not valid. Please run this command from a workspace.");
19
+ }
20
+ const { sourceRoot } = context2.projectsConfigurations.projects[context2.projectName];
21
+ _chunkZ2BSLIJ7js.run.call(void 0, config, [
22
+ "pulumi",
23
+ command,
24
+ ...argsMapper(options)
25
+ ].filter(Boolean).join(" "), _path.join.call(void 0, config.workspaceRoot, options.root || sourceRoot), "inherit", {
26
+ ...process.env,
27
+ PULUMI_EXPERIMENTAL: "true"
28
+ });
29
+ return null;
30
+ }, executorOptions)(_options, context);
31
+ }, "withPulumiExecutor");
32
+
33
+
34
+
35
+ exports.withPulumiExecutor = withPulumiExecutor;
@@ -0,0 +1,15 @@
1
+ import {
2
+ withPulumiExecutor
3
+ } from "./chunk-U64WWLJ7.mjs";
4
+
5
+ // src/executors/refresh/executor.ts
6
+ var executor_default = withPulumiExecutor("refresh", (options) => [
7
+ "--suppress-progress",
8
+ options.stack && `--stack=${options.stack}`,
9
+ options.skipPreview && "--skip-preview",
10
+ options.yes && "--yes"
11
+ ]);
12
+
13
+ export {
14
+ executor_default
15
+ };