@tahminator/pipeline 1.0.41 → 1.0.42
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/pulumi/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { OpMap, OpType
|
|
2
|
-
import { type
|
|
1
|
+
import type { OpMap, OpType } from "@pulumi/pulumi/automation";
|
|
2
|
+
import { type PulumiPreviewResult, type PulumiUpResult } from "./strategy";
|
|
3
3
|
import { type PulumiClientCreateArgs } from "./types";
|
|
4
4
|
export declare class PulumiClient {
|
|
5
5
|
private readonly strategy;
|
|
@@ -9,7 +9,7 @@ export declare class PulumiClient {
|
|
|
9
9
|
}>;
|
|
10
10
|
private constructor();
|
|
11
11
|
static create(args: PulumiClientCreateArgs): Promise<PulumiClient>;
|
|
12
|
-
up(): Promise<
|
|
13
|
-
preview(): Promise<
|
|
12
|
+
up(): Promise<PulumiUpResult>;
|
|
13
|
+
preview(): Promise<PulumiPreviewResult>;
|
|
14
14
|
static parseChangeSumaryToPrettyTable(changeSummary: OpMap): string;
|
|
15
15
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { type UpResult } from "@pulumi/pulumi/automation";
|
|
2
1
|
import type { PulumiClientAzureStrategyArgs } from "../types";
|
|
3
|
-
import type {
|
|
2
|
+
import type { PulumiPreviewResult, IPulumiClientStrategy, PulumiUpResult } from "./types";
|
|
4
3
|
export declare class AzurePulumiClientStrategy implements IPulumiClientStrategy {
|
|
5
|
-
private readonly
|
|
4
|
+
private readonly args;
|
|
5
|
+
private readonly env;
|
|
6
6
|
private constructor();
|
|
7
7
|
static create(args: PulumiClientAzureStrategyArgs): Promise<AzurePulumiClientStrategy>;
|
|
8
|
-
up(): Promise<
|
|
9
|
-
preview(): Promise<
|
|
8
|
+
up(): Promise<PulumiUpResult>;
|
|
9
|
+
preview(): Promise<PulumiPreviewResult>;
|
|
10
|
+
private runPulumiCmd;
|
|
10
11
|
}
|
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ } from "bun";
|
|
2
2
|
export class AzurePulumiClientStrategy {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
args;
|
|
4
|
+
env;
|
|
5
|
+
constructor(args) {
|
|
6
|
+
this.args = args;
|
|
7
|
+
this.env = Object.fromEntries(Object.entries(this.args.envs).filter((entry) => entry[1] !== undefined));
|
|
6
8
|
}
|
|
7
9
|
static async create(args) {
|
|
8
|
-
|
|
9
|
-
stackName: args.stackName,
|
|
10
|
-
workDir: args.workDir,
|
|
11
|
-
}, {
|
|
12
|
-
envVars: {
|
|
13
|
-
...Object.fromEntries(Object.entries(args.envs).filter((entry) => entry[1] !== undefined)),
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
return new AzurePulumiClientStrategy(stack);
|
|
10
|
+
return new AzurePulumiClientStrategy(args);
|
|
17
11
|
}
|
|
18
12
|
async up() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
13
|
+
const cliOutput = await this.runPulumiCmd(["up", "--yes"]);
|
|
14
|
+
return { cliOutput };
|
|
22
15
|
}
|
|
23
16
|
async preview() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
...result,
|
|
33
|
-
cliOutput: buffer,
|
|
34
|
-
};
|
|
17
|
+
const cliOutput = await this.runPulumiCmd(["preview"]);
|
|
18
|
+
return { cliOutput };
|
|
19
|
+
}
|
|
20
|
+
async runPulumiCmd(args) {
|
|
21
|
+
return $ `pulumi ${args} --stack ${this.args.stackName}`
|
|
22
|
+
.cwd(this.args.workDir)
|
|
23
|
+
.env(this.env)
|
|
24
|
+
.text();
|
|
35
25
|
}
|
|
36
26
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export type PulumiPreviewResult = {
|
|
2
|
+
cliOutput: string;
|
|
3
|
+
};
|
|
4
|
+
export type PulumiUpResult = {
|
|
3
5
|
cliOutput: string;
|
|
4
6
|
};
|
|
5
7
|
export interface IPulumiClientStrategy {
|
|
6
|
-
up(): Promise<
|
|
7
|
-
preview(): Promise<
|
|
8
|
+
up(): Promise<PulumiUpResult>;
|
|
9
|
+
preview(): Promise<PulumiPreviewResult>;
|
|
8
10
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Tahmid Ahmed",
|
|
5
5
|
"description": "A collection of Bun shell scripts that can be re-used in various CICD pipelines.",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.42",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "git+https://github.com/tahminator/pipeline.git"
|
|
9
9
|
},
|