@storm-software/pulumi-tools 0.10.2 → 0.11.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +1 -1
  3. package/dist/{chunk-AX7ML27E.mjs → chunk-3EC7JLPE.mjs} +1 -1
  4. package/dist/{chunk-LM56PRM3.mjs → chunk-4O2PMSOY.mjs} +14 -17
  5. package/dist/{chunk-UWD6HQGL.mjs → chunk-7SRRHU3C.mjs} +1 -1
  6. package/dist/{chunk-D5ZRINNZ.js → chunk-BOBR4VPF.js} +2 -2
  7. package/dist/{chunk-Y7FQ4DGH.mjs → chunk-CFGXNIA4.mjs} +1 -1
  8. package/dist/{chunk-LPXQTX6R.js → chunk-DFGSDTGO.js} +3 -3
  9. package/dist/{chunk-6537GKN5.js → chunk-ENOW7DUM.js} +1 -4
  10. package/dist/{chunk-XCMHF3SO.js → chunk-EWECYCTE.js} +2 -2
  11. package/dist/{chunk-T27SI2SK.js → chunk-FOPJOETC.js} +5 -5
  12. package/dist/{chunk-Z7FQSZPS.mjs → chunk-H7M5JNBX.mjs} +1 -1
  13. package/dist/{chunk-ZZ36FEKL.js → chunk-LD6DPEA2.js} +2 -2
  14. package/dist/{chunk-EPCF63CW.mjs → chunk-LNQUR5AA.mjs} +1 -1
  15. package/dist/{chunk-63OFHFSN.mjs → chunk-OPWCK5QZ.mjs} +1 -1
  16. package/dist/{chunk-W4FTQCZC.js → chunk-OYZ356QT.js} +2 -2
  17. package/dist/{chunk-SV6O36JV.mjs → chunk-SA5AEUUC.mjs} +1 -1
  18. package/dist/{chunk-HCCK34CD.js → chunk-SSD47K6E.js} +2 -2
  19. package/dist/executors.js +7 -7
  20. package/dist/executors.mjs +7 -7
  21. package/dist/generators.js +3 -3
  22. package/dist/generators.mjs +2 -2
  23. package/dist/index.js +9 -9
  24. package/dist/index.mjs +8 -8
  25. package/dist/src/base/base-executor.js +3 -3
  26. package/dist/src/base/base-executor.mjs +2 -2
  27. package/dist/src/base/index.js +3 -3
  28. package/dist/src/base/index.mjs +2 -2
  29. package/dist/src/executors/config/executor.js +4 -4
  30. package/dist/src/executors/config/executor.mjs +3 -3
  31. package/dist/src/executors/import/executor.js +4 -4
  32. package/dist/src/executors/import/executor.mjs +3 -3
  33. package/dist/src/executors/preview/executor.js +4 -4
  34. package/dist/src/executors/preview/executor.mjs +3 -3
  35. package/dist/src/executors/refresh/executor.js +4 -4
  36. package/dist/src/executors/refresh/executor.mjs +3 -3
  37. package/dist/src/executors/up/executor.js +4 -4
  38. package/dist/src/executors/up/executor.mjs +3 -3
  39. package/dist/src/generators/init/generator.js +3 -3
  40. package/dist/src/generators/init/generator.mjs +2 -2
  41. package/package.json +11 -34
  42. package/.eslintrc.json +0 -40
  43. package/executors.ts +0 -10
  44. package/generators.ts +0 -2
  45. package/index.ts +0 -3
  46. package/project.json +0 -57
  47. package/src/base/base-executor.ts +0 -77
  48. package/src/base/index.ts +0 -2
  49. package/src/base/providers.ts +0 -9
  50. package/src/executors/config/executor.ts +0 -11
  51. package/src/executors/import/executor.ts +0 -10
  52. package/src/executors/preview/executor.ts +0 -10
  53. package/src/executors/refresh/executor.ts +0 -12
  54. package/src/executors/up/executor.ts +0 -12
  55. package/src/generators/init/generator.ts +0 -167
  56. package/tsconfig.json +0 -31
  57. package/tsup.config.ts +0 -24
  58. /package/{src → dist/src}/executors/config/schema.d.ts +0 -0
  59. /package/{src → dist/src}/executors/config/schema.json +0 -0
  60. /package/{src → dist/src}/executors/import/schema.d.ts +0 -0
  61. /package/{src → dist/src}/executors/import/schema.json +0 -0
  62. /package/{src → dist/src}/executors/preview/schema.d.ts +0 -0
  63. /package/{src → dist/src}/executors/preview/schema.json +0 -0
  64. /package/{src → dist/src}/executors/refresh/schema.d.ts +0 -0
  65. /package/{src → dist/src}/executors/refresh/schema.json +0 -0
  66. /package/{src → dist/src}/executors/up/schema.d.ts +0 -0
  67. /package/{src → dist/src}/executors/up/schema.json +0 -0
  68. /package/{src → dist/src}/generators/init/files/src/index.ts.template +0 -0
  69. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  70. /package/{src → dist/src}/generators/init/schema.json +0 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkXCMHF3SOjs = require('../../../chunk-XCMHF3SO.js');
4
- require('../../../chunk-LPXQTX6R.js');
5
- require('../../../chunk-6537GKN5.js');
3
+ var _chunkEWECYCTEjs = require('../../../chunk-EWECYCTE.js');
4
+ require('../../../chunk-DFGSDTGO.js');
5
+ require('../../../chunk-ENOW7DUM.js');
6
6
  require('../../../chunk-3RG5ZIWI.js');
7
7
 
8
8
 
9
- exports.default = _chunkXCMHF3SOjs.executor_default;
9
+ exports.default = _chunkEWECYCTEjs.executor_default;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  executor_default
3
- } from "../../../chunk-UWD6HQGL.mjs";
4
- import "../../../chunk-SV6O36JV.mjs";
5
- import "../../../chunk-LM56PRM3.mjs";
3
+ } from "../../../chunk-7SRRHU3C.mjs";
4
+ import "../../../chunk-SA5AEUUC.mjs";
5
+ import "../../../chunk-4O2PMSOY.mjs";
6
6
  import "../../../chunk-IEZKYJSF.mjs";
7
7
  export {
8
8
  executor_default as default
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkT27SI2SKjs = require('../../../chunk-T27SI2SK.js');
4
+ var _chunkFOPJOETCjs = require('../../../chunk-FOPJOETC.js');
5
5
  require('../../../chunk-HUKXHFCA.js');
6
- require('../../../chunk-6537GKN5.js');
6
+ require('../../../chunk-ENOW7DUM.js');
7
7
  require('../../../chunk-3RG5ZIWI.js');
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkT27SI2SKjs.generator_default; exports.initGeneratorFn = _chunkT27SI2SKjs.initGeneratorFn;
11
+ exports.default = _chunkFOPJOETCjs.generator_default; exports.initGeneratorFn = _chunkFOPJOETCjs.initGeneratorFn;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generator_default,
3
3
  initGeneratorFn
4
- } from "../../../chunk-63OFHFSN.mjs";
4
+ } from "../../../chunk-OPWCK5QZ.mjs";
5
5
  import "../../../chunk-KPFHCT4A.mjs";
6
- import "../../../chunk-LM56PRM3.mjs";
6
+ import "../../../chunk-4O2PMSOY.mjs";
7
7
  import "../../../chunk-IEZKYJSF.mjs";
8
8
  export {
9
9
  generator_default as default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/pulumi-tools",
3
- "version": "0.10.2",
3
+ "version": "0.11.1",
4
4
  "type": "commonjs",
5
5
  "description": "Tools for managing Pulumi infrastructure within a Nx workspace.",
6
6
  "repository": {
@@ -32,28 +32,16 @@
32
32
  "types": "./dist/index.d.mts",
33
33
  "default": "./dist/index.mjs"
34
34
  },
35
- "require": {
36
- "types": "./dist/index.d.ts",
37
- "default": "./dist/index.js"
38
- },
39
- "default": {
40
- "types": "./dist/index.d.ts",
41
- "default": "./dist/index.js"
42
- }
35
+ "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
36
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
43
37
  },
44
38
  "./index": {
45
39
  "import": {
46
40
  "types": "./dist/index.d.mts",
47
41
  "default": "./dist/index.mjs"
48
42
  },
49
- "require": {
50
- "types": "./dist/index.d.ts",
51
- "default": "./dist/index.js"
52
- },
53
- "default": {
54
- "types": "./dist/index.d.ts",
55
- "default": "./dist/index.js"
56
- }
43
+ "require": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
44
+ "default": { "types": "./dist/index.d.ts", "default": "./dist/index.js" }
57
45
  },
58
46
  "./executors": {
59
47
  "import": {
@@ -133,20 +121,11 @@
133
121
  "tsup": "8.4.0"
134
122
  },
135
123
  "peerDependenciesMeta": {
136
- "@nx/devkit": {
137
- "optional": false
138
- },
139
- "@pulumi/pulumi": {
140
- "optional": false
141
- },
142
- "nx": {
143
- "optional": false
144
- }
145
- },
146
- "dependencies": {
147
- "@nx/devkit": "20.8.0",
148
- "shelljs": "^0.8.5"
124
+ "@nx/devkit": { "optional": false },
125
+ "@pulumi/pulumi": { "optional": false },
126
+ "nx": { "optional": false }
149
127
  },
128
+ "dependencies": { "@nx/devkit": "20.8.0", "shelljs": "^0.8.5" },
150
129
  "devDependencies": {
151
130
  "@nx/devkit": "20.8.0",
152
131
  "@types/node": "^22.10.2",
@@ -154,9 +133,7 @@
154
133
  "tsup": "8.4.0",
155
134
  "untyped": "^1.5.2"
156
135
  },
157
- "publishConfig": {
158
- "access": "public"
159
- },
136
+ "publishConfig": { "access": "public" },
160
137
  "executors": "./executors.json",
161
138
  "generators": "./generators.json"
162
- }
139
+ }
package/.eslintrc.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "extends": ["../../.eslintrc.json"],
3
- "ignorePatterns": ["!**/*"],
4
- "overrides": [
5
- {
6
- "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7
- "parserOptions": {
8
- "project": ["packages/pulumi-tools/tsconfig.*?.json"]
9
- },
10
- "rules": {}
11
- },
12
- {
13
- "files": ["*.ts", "*.tsx"],
14
- "rules": {}
15
- },
16
- {
17
- "files": ["*.js", "*.jsx"],
18
- "rules": {}
19
- },
20
- {
21
- "files": ["*.json"],
22
- "parser": "jsonc-eslint-parser",
23
- "rules": {
24
- "@nx/dependency-checks": [
25
- "error",
26
- {
27
- "ignoredFiles": ["{projectRoot}/eslint.config.{js,cjs,mjs}"]
28
- }
29
- ]
30
- }
31
- },
32
- {
33
- "files": ["./package.json", "./executors.json", "./generators.json"],
34
- "parser": "jsonc-eslint-parser",
35
- "rules": {
36
- "@nx/nx-plugin-checks": "error"
37
- }
38
- }
39
- ]
40
- }
package/executors.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from "./src/executors/config/executor";
2
- export { type ConfigExecutorSchema } from "./src/executors/config/schema.d";
3
- export * from "./src/executors/import/executor";
4
- export { type ImportExecutorSchema } from "./src/executors/import/schema.d";
5
- export * from "./src/executors/preview/executor";
6
- export { type PreviewExecutorSchema } from "./src/executors/preview/schema.d";
7
- export * from "./src/executors/refresh/executor";
8
- export { type RefreshExecutorSchema } from "./src/executors/refresh/schema.d";
9
- export * from "./src/executors/up/executor";
10
- export { type UpExecutorSchema } from "./src/executors/up/schema.d";
package/generators.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./src/generators/init/generator";
2
- export { type InitGeneratorSchema } from "./src/generators/init/schema.d";
package/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./executors";
2
- export * from "./generators";
3
- export * from "./src/base";
package/project.json DELETED
@@ -1,57 +0,0 @@
1
- {
2
- "name": "pulumi-tools",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/pulumi-tools/src",
5
- "projectType": "library",
6
- "implicitDependencies": ["workspace-tools", "config-tools", "config"],
7
- "targets": {
8
- "build-untyped": {
9
- "executor": "nx:run-commands",
10
- "dependsOn": ["clean", "^build"],
11
- "inputs": [
12
- "{projectRoot}/src/**/untyped.ts",
13
- "{projectRoot}/src/**/*.untyped.ts"
14
- ],
15
- "outputs": [
16
- "{projectRoot}/src/**/schema.d.ts",
17
- "{projectRoot}/src/**/*.schema.d.ts",
18
- "{projectRoot}/src/**/schema.md",
19
- "{projectRoot}/src/**/*.schema.md",
20
- "{projectRoot}/src/**/schema.json",
21
- "{projectRoot}/src/**/*.schema.json"
22
- ],
23
- "options": {
24
- "commands": [
25
- "node dist/packages/untyped/bin/untyped.cjs generate --entry=\"packages/pulumi-tools/**/{untyped.ts,*.untyped.ts}\" "
26
- ]
27
- }
28
- },
29
- "build-base": {
30
- "executor": "nx:run-commands",
31
- "dependsOn": ["build-untyped", "clean", "^build"],
32
- "options": {
33
- "command": "tsup-node --config=tsup.config.ts",
34
- "cwd": "{projectRoot}"
35
- }
36
- },
37
- "build": {
38
- "executor": "nx:run-commands",
39
- "dependsOn": ["build-base", "build-untyped"],
40
- "options": {
41
- "commands": [
42
- "pnpm copyfiles LICENSE dist/packages/pulumi-tools",
43
- "pnpm copyfiles --up=2 ./packages/pulumi-tools/*.md ./packages/pulumi-tools/executors.json ./packages/pulumi-tools/generators.json ./packages/pulumi-tools/package.json dist/packages/pulumi-tools",
44
- "pnpm copyfiles --up=3 \"./packages/pulumi-tools/dist/**/*\" dist/packages/pulumi-tools/dist",
45
- "pnpm copyfiles --up=3 \"./packages/pulumi-tools/src/**/*schema.d.ts\" dist/packages/pulumi-tools/dist/src",
46
- "pnpm copyfiles --up=3 \"./packages/pulumi-tools/src/**/*schema.json\" dist/packages/pulumi-tools/dist/src",
47
- "pnpm copyfiles --up=3 \"./packages/pulumi-tools/src/**/*.md\" dist/packages/pulumi-tools/docs/api",
48
- "pnpm copyfiles --up=4 \"./packages/pulumi-tools/src/generators/*/files/**/*\" dist/packages/pulumi-tools/dist/src/generators"
49
- ]
50
- }
51
- },
52
-
53
- "nx-release-publish": {
54
- "executor": "@storm-software/workspace-tools:npm-publish"
55
- }
56
- }
57
- }
@@ -1,77 +0,0 @@
1
- import type { ExecutorContext } from "@nx/devkit";
2
- import { StormWorkspaceConfig } from "@storm-software/config";
3
- import { ProjectTokenizerOptions, run } from "@storm-software/config-tools";
4
- import type { BaseExecutorOptions } from "@storm-software/workspace-tools";
5
- import { withRunExecutor } from "@storm-software/workspace-tools";
6
- import { BaseExecutorSchema } from "@storm-software/workspace-tools/base/base-executor.schema.d";
7
- import { join } from "node:path";
8
- import { which } from "shelljs";
9
-
10
- export interface PulumiCommandOptions {
11
- stack?: string;
12
- root?: string;
13
- parent?: string;
14
- name?: string;
15
- }
16
-
17
- export type PulumiExecutorSchema = BaseExecutorSchema &
18
- Partial<PulumiCommandOptions>;
19
-
20
- export type NormalizedPulumiExecutorOptions<
21
- TExecutorSchema extends PulumiExecutorSchema = PulumiExecutorSchema
22
- > = ProjectTokenizerOptions & TExecutorSchema;
23
-
24
- export const withPulumiExecutor =
25
- <TExecutorSchema extends PulumiExecutorSchema = PulumiExecutorSchema>(
26
- command: string,
27
- argsMapper: (
28
- options: NormalizedPulumiExecutorOptions<TExecutorSchema>
29
- ) => Array<string | false | undefined>,
30
- executorOptions: BaseExecutorOptions<TExecutorSchema> = {}
31
- ) =>
32
- async (
33
- _options: TExecutorSchema,
34
- context: ExecutorContext
35
- ): Promise<{ success: boolean }> => {
36
- return withRunExecutor<TExecutorSchema>(
37
- `Pulumi \`${command}\` Command Executor`,
38
- async (
39
- options: NormalizedPulumiExecutorOptions<TExecutorSchema>,
40
- context: ExecutorContext,
41
- config: StormWorkspaceConfig
42
- ) => {
43
- if (!which("pulumi")) {
44
- throw new Error(
45
- "Pulumi is not installed. Please install it before running this executor."
46
- );
47
- }
48
-
49
- if (
50
- !context.projectsConfigurations?.projects ||
51
- !context.projectName ||
52
- !context.projectsConfigurations.projects[context.projectName]
53
- ) {
54
- throw new Error(
55
- "The Build process failed because the context is not valid. Please run this command from a workspace."
56
- );
57
- }
58
-
59
- const { sourceRoot } =
60
- context.projectsConfigurations.projects[context.projectName]!;
61
-
62
- run(
63
- config,
64
- ["pulumi", command, ...argsMapper(options)].filter(Boolean).join(" "),
65
- join(config.workspaceRoot, (options.root || sourceRoot)!),
66
- "inherit",
67
- {
68
- ...process.env,
69
- PULUMI_EXPERIMENTAL: "true"
70
- }
71
- );
72
-
73
- return null;
74
- },
75
- executorOptions
76
- )(_options, context);
77
- };
package/src/base/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./base-executor";
2
- export * from "./providers";
@@ -1,9 +0,0 @@
1
- export enum Provider {
2
- AWS = "aws",
3
- AZURE = "azure",
4
- GOOGLE_CLOUD_PLATFORM = "gcp",
5
- }
6
-
7
- export function getCloudTemplateName(cloudProvider: string) {
8
- return `${cloudProvider}-typescript`;
9
- }
@@ -1,11 +0,0 @@
1
- import { withPulumiExecutor } from "../../base/base-executor";
2
- import { ConfigExecutorSchema } from "./schema";
3
-
4
- export default withPulumiExecutor<ConfigExecutorSchema>("config", (options) => [
5
- options.action,
6
- options.showSecrets && `--show-secrets`,
7
- options.secret && `--secret`,
8
- options.path && `--path`,
9
- options.name && options.value && `"${options.name}" "${options.value}"`,
10
- options.stack && `--stack=${options.stack}`,
11
- ]);
@@ -1,10 +0,0 @@
1
- import { withPulumiExecutor } from "../../base/base-executor";
2
- import { ImportExecutorSchema } from "./schema";
3
-
4
- export default withPulumiExecutor<ImportExecutorSchema>("import", (options) => [
5
- options.target,
6
- options.name,
7
- options.id,
8
- options.parent && `--parent 'parent=${options.parent}'`,
9
- options.stack && `--stack=${options.stack}`,
10
- ]);
@@ -1,10 +0,0 @@
1
- import { withPulumiExecutor } from "../../base/base-executor";
2
- import { PreviewExecutorSchema } from "./schema.d";
3
-
4
- export default withPulumiExecutor<PreviewExecutorSchema>(
5
- "preview",
6
- (options) => [
7
- options.stack && `--stack=${options.stack}`,
8
- options.expectNoChanges && "--expect-no-changes",
9
- ],
10
- );
@@ -1,12 +0,0 @@
1
- import { withPulumiExecutor } from "../../base/base-executor";
2
- import { RefreshExecutorSchema } from "./schema";
3
-
4
- export default withPulumiExecutor<RefreshExecutorSchema>(
5
- "refresh",
6
- (options) => [
7
- "--suppress-progress",
8
- options.stack && `--stack=${options.stack}`,
9
- options.skipPreview && "--skip-preview",
10
- options.yes && "--yes",
11
- ],
12
- );
@@ -1,12 +0,0 @@
1
- import { withPulumiExecutor } from "../../base/base-executor";
2
- import { UpExecutorSchema } from "./schema";
3
-
4
- export default withPulumiExecutor<UpExecutorSchema>("up", (options) => [
5
- "--suppress-progress",
6
- options.stack && `--stack=${options.stack}`,
7
- options.skipPreview && "--skip-preview",
8
- options.yes && "--yes",
9
- options.suppressOutputs && "--suppress-outputs",
10
- options.debug && "--debug",
11
- options.json && "--json",
12
- ]);
@@ -1,167 +0,0 @@
1
- import {
2
- addDependenciesToPackageJson,
3
- addProjectConfiguration,
4
- formatFiles,
5
- GeneratorCallback,
6
- readJsonFile,
7
- runTasksInSerial,
8
- type Tree
9
- } from "@nx/devkit";
10
- import { StormWorkspaceConfig } from "@storm-software/config";
11
- import { run } from "@storm-software/config-tools";
12
- import {
13
- initGenerator as baseInitGenerator,
14
- withRunGenerator
15
- } from "@storm-software/workspace-tools";
16
- import { readFileSync, unlinkSync } from "node:fs";
17
- import { join } from "node:path";
18
- import { getCloudTemplateName } from "../../base/providers";
19
- import type { InitGeneratorSchema } from "./schema";
20
-
21
- export async function initGeneratorFn(
22
- tree: Tree,
23
- options: InitGeneratorSchema,
24
- config: StormWorkspaceConfig
25
- ) {
26
- const task = baseInitGenerator(tree, options);
27
-
28
- addProjectConfiguration(tree, options.name || "deployment", {
29
- root: options.directory || "./deployment",
30
- projectType: "application",
31
- sourceRoot: options.directory || "./deployment",
32
- targets: {
33
- up: {
34
- executor: "@nx-extend/pulumi:up",
35
- options: {}
36
- },
37
- preview: {
38
- executor: "@nx-extend/pulumi:preview",
39
- options: {}
40
- },
41
- refresh: {
42
- executor: "@nx-extend/pulumi:refresh",
43
- options: {}
44
- },
45
- import: {
46
- executor: "@nx-extend/pulumi:import",
47
- options: {}
48
- }
49
- },
50
- tags: ["infra:pulumi"]
51
- });
52
-
53
- await runTasksInSerial(
54
- generateNewPulumiProject(tree, options, config),
55
- loginToPulumi(tree, options, config),
56
- addPulumiDeps(tree, options),
57
- cleanupProject(tree, options)
58
- )();
59
-
60
- if (!options.skipFormat) {
61
- await formatFiles(tree);
62
- }
63
-
64
- return task;
65
- }
66
-
67
- export default withRunGenerator<InitGeneratorSchema>(
68
- "Initialize Storm Pulumi workspace",
69
- initGeneratorFn
70
- );
71
-
72
- function generateNewPulumiProject(
73
- tree: Tree,
74
- options: InitGeneratorSchema,
75
- config: StormWorkspaceConfig
76
- ): GeneratorCallback {
77
- return () => {
78
- const template = getCloudTemplateName(options.provider);
79
-
80
- run(
81
- config,
82
- [
83
- `pulumi new ${template}`,
84
- `--name=${options.name || "deployment"}`,
85
- `--dir=${options.directory || "./deployment"}`,
86
- options.secretsProvider &&
87
- `--secrets-provider=${options.secretsProvider}`,
88
- "--generate-only",
89
- "--yes",
90
- "--force"
91
- ]
92
- .filter(Boolean)
93
- .join(" "),
94
- join(config.workspaceRoot, options.directory || "./deployment"),
95
- "inherit"
96
- );
97
- };
98
- }
99
-
100
- function loginToPulumi(
101
- tree: Tree,
102
- options: InitGeneratorSchema,
103
- config: StormWorkspaceConfig
104
- ): GeneratorCallback {
105
- return () => {
106
- if (!options.login) {
107
- return;
108
- }
109
-
110
- if (options.login.startsWith("file://")) {
111
- options.login = `file://${tree.root}/${
112
- options.directory || "./deployment"
113
- }/${options.login.replace("file://", "")}`;
114
- }
115
-
116
- run(
117
- config,
118
- ["pulumi login", options.login].filter(Boolean).join(" "),
119
- join(config.workspaceRoot, options.directory || "./deployment"),
120
- "inherit",
121
- {
122
- ...process.env,
123
- PULUMI_EXPERIMENTAL: "true"
124
- }
125
- );
126
- };
127
- }
128
-
129
- function addPulumiDeps(
130
- tree: Tree,
131
- options: InitGeneratorSchema
132
- ): GeneratorCallback {
133
- return () => {
134
- const packageJson = readJsonFile(`${options.directory}/package.json`);
135
-
136
- if (packageJson) {
137
- addDependenciesToPackageJson(tree, {}, packageJson.dependencies || {})();
138
- }
139
- };
140
- }
141
-
142
- function cleanupProject(
143
- tree: Tree,
144
- options: InitGeneratorSchema
145
- ): GeneratorCallback {
146
- return () => {
147
- const indexTsLocation = join(
148
- tree.root,
149
- `${options.directory || "./deployment"}/index.ts`
150
- );
151
- tree.write(
152
- `${options.directory}/pulumi.ts`,
153
- readFileSync(indexTsLocation).toString()
154
- );
155
-
156
- // Remove the unneeded files
157
- unlinkSync(
158
- join(tree.root, `${options.directory || "./deployment"}/.gitignore`)
159
- );
160
- unlinkSync(
161
- join(tree.root, `${options.directory || "./deployment"}/package.json`)
162
- );
163
- unlinkSync(
164
- join(tree.root, `${options.directory || "./deployment"}/tsconfig.json`)
165
- );
166
- };
167
- }
package/tsconfig.json DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "rootDir": "../..",
6
- "target": "ESNext",
7
- "module": "ESNext",
8
- "lib": ["ESNext"],
9
- "skipLibCheck": true,
10
- "skipDefaultLibCheck": true,
11
- "moduleResolution": "Bundler",
12
- "moduleDetection": "force",
13
- "types": ["node"]
14
- },
15
- "include": [
16
- "executors.ts",
17
- "generators.ts",
18
- "index.ts",
19
- "src/**/*.ts",
20
- "src/**/*.d.ts",
21
- "src/**/*.json",
22
- "tsup.config.ts"
23
- ],
24
- "exclude": [
25
- "jest.config.ts",
26
- "src/generators/**/files/**/*",
27
- "src/**/untyped.ts",
28
- "src/**/*.spec.ts",
29
- "src/**/*.test.ts"
30
- ]
31
- }
package/tsup.config.ts DELETED
@@ -1,24 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig([
4
- {
5
- name: "pulumi-tools",
6
- target: "node22",
7
- entryPoints: [
8
- "./*.ts",
9
- "./src/base/*.ts",
10
- "./src/executors/*/executor.ts",
11
- "./src/generators/*/generator.ts",
12
- ],
13
- outDir: "dist",
14
- format: ["cjs", "esm"],
15
- platform: "node",
16
- splitting: true,
17
- clean: true,
18
- dts: true,
19
- sourcemap: false,
20
- shims: true,
21
- tsconfig: "./tsconfig.json",
22
- external: ["@storm-software/workspace-tools"],
23
- },
24
- ]);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes