@storm-software/pulumi-tools 0.0.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/LICENSE +201 -0
- package/README.md +7 -0
- package/executors/config/executor.js +4847 -0
- package/executors/import/executor.js +4846 -0
- package/executors/preview/executor.js +4843 -0
- package/executors/refresh/executor.js +4845 -0
- package/executors/up/executor.js +4848 -0
- package/executors.json +29 -0
- package/generators/init/generator.js +150 -0
- package/generators.json +9 -0
- package/index.js +5008 -0
- package/meta.json +3939 -0
- package/package.json +81 -0
- package/src/base/base-executor.d.ts +14 -0
- package/src/base/index.d.ts +2 -0
- package/src/base/providers.d.ts +6 -0
- package/src/executors/config/executor.d.ts +5 -0
- package/src/executors/config/schema.d.ts +9 -0
- package/src/executors/config/schema.json +38 -0
- package/src/executors/import/executor.d.ts +5 -0
- package/src/executors/import/schema.d.ts +6 -0
- package/src/executors/import/schema.json +40 -0
- package/src/executors/index.d.ts +5 -0
- package/src/executors/preview/executor.d.ts +5 -0
- package/src/executors/preview/schema.d.ts +5 -0
- package/src/executors/preview/schema.json +22 -0
- package/src/executors/refresh/executor.d.ts +5 -0
- package/src/executors/refresh/schema.d.ts +6 -0
- package/src/executors/refresh/schema.json +29 -0
- package/src/executors/up/executor.d.ts +5 -0
- package/src/executors/up/schema.d.ts +8 -0
- package/src/executors/up/schema.json +39 -0
- package/src/generators/index.d.ts +1 -0
- package/src/generators/init/files/src/index.ts.template +1 -0
- package/src/generators/init/generator.d.ts +6 -0
- package/src/generators/init/schema.d.ts +10 -0
- package/src/generators/init/schema.json +52 -0
- package/src/index.d.ts +2 -0
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@storm-software/pulumi-tools",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"description": "Tools for managing Pulumi infrastructure within a Nx workspace.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "github",
|
|
8
|
+
"url": "https://github.com/storm-software/storm-ops",
|
|
9
|
+
"directory": "packages/pulumi-tools"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://stormsoftware.com",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/storm-software/storm-ops/issues",
|
|
14
|
+
"email": "support@stormsoftware.com"
|
|
15
|
+
},
|
|
16
|
+
"author": {
|
|
17
|
+
"name": "Storm Software",
|
|
18
|
+
"email": "contact@stormsoftware.com",
|
|
19
|
+
"url": "https://stormsoftware.com"
|
|
20
|
+
},
|
|
21
|
+
"license": "Apache-2.0",
|
|
22
|
+
"private": false,
|
|
23
|
+
"main": "./index.js",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./index.js",
|
|
26
|
+
"./package.json": "./package.json",
|
|
27
|
+
"./generators.json": "./generators.json",
|
|
28
|
+
"./generators/*/schema.json": "./src/generators/*/schema.json",
|
|
29
|
+
"./executors.json": "./executors.json",
|
|
30
|
+
"./executors/*/schema.json": "./src/executors/*/schema.json",
|
|
31
|
+
"./plugins": "./src/plugins/index.js",
|
|
32
|
+
"./utils": "./src/utils/index.js"
|
|
33
|
+
},
|
|
34
|
+
"typings": "./declarations.d.ts",
|
|
35
|
+
"keywords": [
|
|
36
|
+
"storm",
|
|
37
|
+
"storm-ops",
|
|
38
|
+
"pulumi",
|
|
39
|
+
"iac",
|
|
40
|
+
"infrastructure",
|
|
41
|
+
"storm-stack",
|
|
42
|
+
"sullivanpj",
|
|
43
|
+
"monorepo"
|
|
44
|
+
],
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"@nx/devkit": "^20.2.2",
|
|
47
|
+
"@nx/workspace": "^20.2.2",
|
|
48
|
+
"@pulumi/pulumi": "^3.144.1",
|
|
49
|
+
"nx": "^20.2.2"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"@nx/devkit": {
|
|
53
|
+
"optional": false
|
|
54
|
+
},
|
|
55
|
+
"@nx/workspace": {
|
|
56
|
+
"optional": false
|
|
57
|
+
},
|
|
58
|
+
"@pulumi/pulumi": {
|
|
59
|
+
"optional": false
|
|
60
|
+
},
|
|
61
|
+
"nx": {
|
|
62
|
+
"optional": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"dependencies": {
|
|
66
|
+
"@nx/devkit": "20.2.2",
|
|
67
|
+
"@pulumi/pulumi": "^3.144.1",
|
|
68
|
+
"shelljs": "^0.8.5",
|
|
69
|
+
"tslib": "^2.6.3"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@nx/devkit": "^20.2.2",
|
|
73
|
+
"@nx/workspace": "^20.2.2",
|
|
74
|
+
"nx": "^20.2.2"
|
|
75
|
+
},
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"access": "public"
|
|
78
|
+
},
|
|
79
|
+
"executors": "./executors.json",
|
|
80
|
+
"generators": "./generators.json"
|
|
81
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import { ProjectTokenizerOptions } from "@storm-software/config-tools";
|
|
3
|
+
import type { BaseExecutorOptions, BaseExecutorSchema } from "@storm-software/workspace-tools";
|
|
4
|
+
export interface PulumiCommandOptions {
|
|
5
|
+
stack?: string;
|
|
6
|
+
root?: string;
|
|
7
|
+
parent?: string;
|
|
8
|
+
name?: string;
|
|
9
|
+
}
|
|
10
|
+
export type PulumiExecutorSchema = BaseExecutorSchema & Partial<PulumiCommandOptions>;
|
|
11
|
+
export type NormalizedPulumiExecutorOptions = ProjectTokenizerOptions & PulumiExecutorSchema;
|
|
12
|
+
export declare const withPulumiExecutor: <TExecutorSchema extends PulumiExecutorSchema = PulumiExecutorSchema>(command: string, argsMapper: (options: NormalizedPulumiExecutorOptions) => string[], executorOptions?: BaseExecutorOptions<TExecutorSchema>) => (_options: TExecutorSchema, context: ExecutorContext) => Promise<{
|
|
13
|
+
success: boolean;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"title": "Pulumi `config` Command Executor",
|
|
6
|
+
"description": "Run the `config` command using the workspaces Pulumi IoC CLI",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"stack": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The target stack to use, if specified."
|
|
12
|
+
},
|
|
13
|
+
"root": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The working directory to run Pulumi commands from, if specified."
|
|
16
|
+
},
|
|
17
|
+
"action": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"$default": {
|
|
20
|
+
"$source": "argv",
|
|
21
|
+
"index": 0
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"path": {
|
|
25
|
+
"type": "boolean"
|
|
26
|
+
},
|
|
27
|
+
"secret": {
|
|
28
|
+
"type": "boolean"
|
|
29
|
+
},
|
|
30
|
+
"name": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"value": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": ["action"]
|
|
38
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"title": "Pulumi `import` Command Executor",
|
|
6
|
+
"description": "Run the `import` command using the workspaces Pulumi IoC CLI",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"stack": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The target stack to use, if specified."
|
|
12
|
+
},
|
|
13
|
+
"root": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The working directory to run Pulumi commands from, if specified."
|
|
16
|
+
},
|
|
17
|
+
"target": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"$default": {
|
|
20
|
+
"$source": "argv",
|
|
21
|
+
"index": 0
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"$default": {
|
|
27
|
+
"$source": "argv",
|
|
28
|
+
"index": 1
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"id": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"$default": {
|
|
34
|
+
"$source": "argv",
|
|
35
|
+
"index": 2
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": ["target", "id"]
|
|
40
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"title": "Pulumi `preview` Command Executor",
|
|
6
|
+
"description": "Run the `preview` command using the workspaces Pulumi IoC CLI",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"stack": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The target stack to use, if specified."
|
|
12
|
+
},
|
|
13
|
+
"root": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The working directory to run Pulumi commands from, if specified."
|
|
16
|
+
},
|
|
17
|
+
"expectNoChanges": {
|
|
18
|
+
"type": "boolean"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": []
|
|
22
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"title": "Pulumi `refresh` Command Executor",
|
|
6
|
+
"description": "Run the `refresh` command using the workspaces Pulumi IoC CLI",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"stack": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The target stack to use, if specified."
|
|
12
|
+
},
|
|
13
|
+
"root": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The working directory to run Pulumi commands from, if specified."
|
|
16
|
+
},
|
|
17
|
+
"skipPreview": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "A boolean flag to skip the preview step.",
|
|
20
|
+
"default": false
|
|
21
|
+
},
|
|
22
|
+
"yes": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"description": "A boolean flag to automatically approve the refresh.",
|
|
25
|
+
"default": false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"required": ["skipPreview", "yes"]
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"version": 2,
|
|
4
|
+
"outputCapture": "direct-nodejs",
|
|
5
|
+
"title": "Pulumi `up` Command Executor",
|
|
6
|
+
"description": "Run the `up` command using the workspaces Pulumi IoC CLI",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"stack": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The target stack to use, if specified."
|
|
12
|
+
},
|
|
13
|
+
"root": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The working directory to run Pulumi commands from, if specified."
|
|
16
|
+
},
|
|
17
|
+
"skipPreview": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"description": "A boolean flag to skip the preview step.",
|
|
20
|
+
"default": false
|
|
21
|
+
},
|
|
22
|
+
"yes": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"description": "A boolean flag to automatically approve the `up` command.",
|
|
25
|
+
"default": false
|
|
26
|
+
},
|
|
27
|
+
"suppressOutputs": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "A boolean flag to suppress outputs in the `up` command.",
|
|
30
|
+
"default": false
|
|
31
|
+
},
|
|
32
|
+
"json": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"description": "A boolean flag to output the `up` command as JSON.",
|
|
35
|
+
"default": false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": ["skipPreview", "yes", "suppressOutputs", "json"]
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./init/generator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const variable = "<%= name %>";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GeneratorCallback, type Tree } from "@nx/devkit";
|
|
2
|
+
import { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { InitGeneratorSchema } from "./schema";
|
|
4
|
+
export declare function initGeneratorFn(tree: Tree, options: InitGeneratorSchema, config: StormConfig): Promise<GeneratorCallback>;
|
|
5
|
+
declare const _default: (tree: Tree, _options: InitGeneratorSchema) => Promise<GeneratorCallback | import("packages/workspace-tools/declarations").BaseGeneratorResult>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseGeneratorSchema } from "@storm-software/workspace-tools/base/base-generator";
|
|
2
|
+
|
|
3
|
+
export interface InitGeneratorSchema extends BaseGeneratorSchema {
|
|
4
|
+
name?: string;
|
|
5
|
+
directory?: string;
|
|
6
|
+
provider?: Provider;
|
|
7
|
+
secretsProvider?: string;
|
|
8
|
+
login?: string;
|
|
9
|
+
skipFormat?: boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "StormPulumiInit",
|
|
4
|
+
"cli": "nx",
|
|
5
|
+
"title": "Init Storm Pulumi Tools Plugin",
|
|
6
|
+
"description": "Init Storm Pulumi Tools Plugin.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like to use?"
|
|
17
|
+
},
|
|
18
|
+
"tags": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Add tags to the project (used for linting)",
|
|
21
|
+
"alias": "t"
|
|
22
|
+
},
|
|
23
|
+
"directory": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "A directory where the project is placed",
|
|
26
|
+
"alias": "d"
|
|
27
|
+
},
|
|
28
|
+
"provider": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Your cloud provider",
|
|
31
|
+
"x-prompt": {
|
|
32
|
+
"message": "Please choose your provider",
|
|
33
|
+
"type": "list",
|
|
34
|
+
"items": [
|
|
35
|
+
{
|
|
36
|
+
"label": "AWS",
|
|
37
|
+
"value": "aws"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"label": "Azure",
|
|
41
|
+
"value": "azure"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"label": "Google Cloud Platform",
|
|
45
|
+
"value": "gcp"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": ["name"]
|
|
52
|
+
}
|
package/src/index.d.ts
ADDED