@tahminator/pipeline 1.0.45 → 1.0.47
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,4 @@
|
|
|
1
|
-
import type { OpMap, OpType } from "@pulumi/pulumi/automation";
|
|
2
|
-
import { type PulumiPreviewResult, type PulumiUpResult } from "./strategy";
|
|
1
|
+
import type { OpMap, OpType, PreviewResult, UpResult } from "@pulumi/pulumi/automation";
|
|
3
2
|
import { type PulumiClientCreateArgs } from "./types";
|
|
4
3
|
export declare class PulumiClient {
|
|
5
4
|
private readonly strategy;
|
|
@@ -9,7 +8,9 @@ export declare class PulumiClient {
|
|
|
9
8
|
}>;
|
|
10
9
|
private constructor();
|
|
11
10
|
static create(args: PulumiClientCreateArgs): Promise<PulumiClient>;
|
|
12
|
-
up(): Promise<
|
|
13
|
-
preview(
|
|
11
|
+
up(): Promise<UpResult>;
|
|
12
|
+
preview(opts: {
|
|
13
|
+
diff: boolean;
|
|
14
|
+
}): Promise<PreviewResult>;
|
|
14
15
|
static parseChangeSumaryToPrettyTable(changeSummary: OpMap): string;
|
|
15
16
|
}
|
package/dist/pulumi/client.js
CHANGED
|
@@ -34,8 +34,8 @@ export class PulumiClient {
|
|
|
34
34
|
async up() {
|
|
35
35
|
return this.strategy.up();
|
|
36
36
|
}
|
|
37
|
-
async preview() {
|
|
38
|
-
return this.strategy.preview();
|
|
37
|
+
async preview(opts) {
|
|
38
|
+
return this.strategy.preview(opts);
|
|
39
39
|
}
|
|
40
40
|
static parseChangeSumaryToPrettyTable(changeSummary) {
|
|
41
41
|
const entries = Object.entries(changeSummary).filter(([_, count]) => count > 0);
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { type PreviewResult, type UpResult } from "@pulumi/pulumi/automation";
|
|
1
2
|
import type { PulumiClientAzureStrategyArgs } from "../types";
|
|
2
|
-
import type {
|
|
3
|
+
import type { IPulumiClientStrategy } from "./types";
|
|
3
4
|
export declare class AzurePulumiClientStrategy implements IPulumiClientStrategy {
|
|
4
|
-
private readonly
|
|
5
|
-
private readonly env;
|
|
5
|
+
private readonly stack;
|
|
6
6
|
private constructor();
|
|
7
7
|
static create(args: PulumiClientAzureStrategyArgs): Promise<AzurePulumiClientStrategy>;
|
|
8
|
-
up(): Promise<
|
|
9
|
-
preview(
|
|
10
|
-
|
|
8
|
+
up(): Promise<UpResult>;
|
|
9
|
+
preview({ diff }: {
|
|
10
|
+
diff: boolean;
|
|
11
|
+
}): Promise<PreviewResult>;
|
|
11
12
|
}
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalWorkspace, } from "@pulumi/pulumi/automation";
|
|
2
2
|
export class AzurePulumiClientStrategy {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this.args = args;
|
|
7
|
-
this.env = Object.fromEntries(Object.entries(this.args.envs).filter((entry) => entry[1] !== undefined));
|
|
3
|
+
stack;
|
|
4
|
+
constructor(stack) {
|
|
5
|
+
this.stack = stack;
|
|
8
6
|
}
|
|
9
7
|
static async create(args) {
|
|
10
|
-
|
|
8
|
+
const stack = await LocalWorkspace.createOrSelectStack({
|
|
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);
|
|
11
17
|
}
|
|
12
18
|
async up() {
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
return this.stack.up({
|
|
20
|
+
color: "never",
|
|
21
|
+
refresh: false,
|
|
22
|
+
});
|
|
15
23
|
}
|
|
16
|
-
async preview() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
.cwd(this.args.workDir)
|
|
23
|
-
.env({ ...process.env, ...this.env })
|
|
24
|
-
.text();
|
|
24
|
+
async preview({ diff }) {
|
|
25
|
+
return this.stack.preview({
|
|
26
|
+
color: "never",
|
|
27
|
+
refresh: false,
|
|
28
|
+
diff,
|
|
29
|
+
});
|
|
25
30
|
}
|
|
26
31
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
cliOutput: string;
|
|
3
|
-
};
|
|
4
|
-
export type PulumiUpResult = {
|
|
5
|
-
cliOutput: string;
|
|
6
|
-
};
|
|
1
|
+
import type { PreviewResult, UpResult } from "@pulumi/pulumi/automation";
|
|
7
2
|
export interface IPulumiClientStrategy {
|
|
8
|
-
up(): Promise<
|
|
9
|
-
preview(
|
|
3
|
+
up(): Promise<UpResult>;
|
|
4
|
+
preview(opts: {
|
|
5
|
+
diff: boolean;
|
|
6
|
+
}): Promise<PreviewResult>;
|
|
10
7
|
}
|
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.47",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "git+https://github.com/tahminator/pipeline.git"
|
|
9
9
|
},
|