@tahminator/pipeline 1.0.50 → 1.0.51
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
|
@@ -11,6 +11,7 @@ export declare class PulumiClient {
|
|
|
11
11
|
up(): Promise<UpResult>;
|
|
12
12
|
preview(opts: {
|
|
13
13
|
diff: boolean;
|
|
14
|
+
rewriteStdoutToColorizedHtml: boolean;
|
|
14
15
|
}): Promise<PreviewResult>;
|
|
15
16
|
refresh(): Promise<RefreshResult>;
|
|
16
17
|
static parseChangeSumaryToPrettyTable(changeSummary: OpMap): string;
|
|
@@ -3,11 +3,13 @@ import type { PulumiClientCreateArgs } from "../types";
|
|
|
3
3
|
import type { IPulumiClientStrategy } from "./types";
|
|
4
4
|
export declare class LocalWorkspacePulumiClientStrategy implements IPulumiClientStrategy {
|
|
5
5
|
private readonly stack;
|
|
6
|
+
private readonly htmlToAnsiConverter;
|
|
6
7
|
private constructor();
|
|
7
8
|
static create(args: PulumiClientCreateArgs): Promise<LocalWorkspacePulumiClientStrategy>;
|
|
8
9
|
up(): Promise<UpResult>;
|
|
9
10
|
preview(args: {
|
|
10
11
|
diff: boolean;
|
|
12
|
+
rewriteStdoutToColorizedHtml: boolean;
|
|
11
13
|
} | undefined): Promise<PreviewResult>;
|
|
12
14
|
refresh(): Promise<RefreshResult>;
|
|
13
15
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { LocalWorkspace, } from "@pulumi/pulumi/automation";
|
|
2
|
+
import Convert from "ansi-to-html";
|
|
2
3
|
export class LocalWorkspacePulumiClientStrategy {
|
|
3
4
|
stack;
|
|
5
|
+
htmlToAnsiConverter = new Convert();
|
|
4
6
|
constructor(stack) {
|
|
5
7
|
this.stack = stack;
|
|
6
8
|
}
|
|
@@ -20,12 +22,19 @@ export class LocalWorkspacePulumiClientStrategy {
|
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
async preview(args) {
|
|
23
|
-
const { diff } = args ?? {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
const { diff, rewriteStdoutToColorizedHtml: colorizedHtml } = args ?? {
|
|
26
|
+
diff: false,
|
|
27
|
+
rewriteStdoutToColorizedHtml: false,
|
|
28
|
+
};
|
|
29
|
+
const previewResult = await this.stack.preview({
|
|
30
|
+
color: colorizedHtml ? "always" : "never",
|
|
26
31
|
refresh: false,
|
|
27
32
|
diff,
|
|
28
33
|
});
|
|
34
|
+
return {
|
|
35
|
+
...previewResult,
|
|
36
|
+
stdout: this.htmlToAnsiConverter.toHtml(previewResult.stdout),
|
|
37
|
+
};
|
|
29
38
|
}
|
|
30
39
|
async refresh() {
|
|
31
40
|
return this.stack.refresh({
|
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.51",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "git+https://github.com/tahminator/pipeline.git"
|
|
9
9
|
},
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@eslint/js": "^10.0.1",
|
|
36
36
|
"@types/bun": "latest",
|
|
37
|
+
"@types/semver": "^7.7.1",
|
|
38
|
+
"@types/yargs": "^17.0.35",
|
|
37
39
|
"eslint": "^10.0.3",
|
|
38
40
|
"eslint-plugin-perfectionist": "^5.7.0",
|
|
39
41
|
"globals": "^17.4.0",
|
|
40
42
|
"jiti": "^2.6.1",
|
|
41
43
|
"prettier": "^3.8.1",
|
|
42
44
|
"typescript-eslint": "^8.57.1",
|
|
43
|
-
"vitest": "^4.1.0"
|
|
44
|
-
"@types/semver": "^7.7.1",
|
|
45
|
-
"@types/yargs": "^17.0.35"
|
|
45
|
+
"vitest": "^4.1.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"typescript": "^5"
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"@octokit/auth-app": "^8.2.0",
|
|
52
52
|
"@octokit/rest": "^22.0.1",
|
|
53
53
|
"@pulumi/pulumi": "^3.230.0",
|
|
54
|
+
"ansi-to-html": "^0.7.2",
|
|
54
55
|
"neverthrow": "^8.2.0",
|
|
55
56
|
"semver": "^7.7.4",
|
|
56
57
|
"yaml": "^2.8.2",
|