@tahminator/pipeline 1.0.48 → 1.0.49
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.js +2 -2
- package/dist/pulumi/strategy/index.d.ts +1 -1
- package/dist/pulumi/strategy/index.js +1 -1
- package/dist/pulumi/strategy/workspace.d.ts +13 -0
- package/dist/pulumi/strategy/{azure.js → workspace.js} +10 -6
- package/package.json +1 -1
- package/dist/pulumi/strategy/azure.d.ts +0 -12
package/dist/pulumi/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LocalWorkspacePulumiClientStrategy, } from "./strategy";
|
|
2
2
|
import { PulumiClientStrategy } from "./types";
|
|
3
3
|
export class PulumiClient {
|
|
4
4
|
strategy;
|
|
@@ -28,7 +28,7 @@ export class PulumiClient {
|
|
|
28
28
|
static async create(args) {
|
|
29
29
|
switch (args.strategy) {
|
|
30
30
|
case PulumiClientStrategy.AZURE:
|
|
31
|
-
return new this(await
|
|
31
|
+
return new this(await LocalWorkspacePulumiClientStrategy.create(args));
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
async up() {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./workspace";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./workspace";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type PreviewResult, type RefreshResult, type UpResult } from "@pulumi/pulumi/automation";
|
|
2
|
+
import type { PulumiClientCreateArgs } from "../types";
|
|
3
|
+
import type { IPulumiClientStrategy } from "./types";
|
|
4
|
+
export declare class LocalWorkspacePulumiClientStrategy implements IPulumiClientStrategy {
|
|
5
|
+
private readonly stack;
|
|
6
|
+
private constructor();
|
|
7
|
+
static create(args: PulumiClientCreateArgs): Promise<LocalWorkspacePulumiClientStrategy>;
|
|
8
|
+
up(): Promise<UpResult>;
|
|
9
|
+
preview(args: {
|
|
10
|
+
diff: boolean;
|
|
11
|
+
} | undefined): Promise<PreviewResult>;
|
|
12
|
+
refresh(): Promise<RefreshResult>;
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocalWorkspace, } from "@pulumi/pulumi/automation";
|
|
2
|
-
export class
|
|
2
|
+
export class LocalWorkspacePulumiClientStrategy {
|
|
3
3
|
stack;
|
|
4
4
|
constructor(stack) {
|
|
5
5
|
this.stack = stack;
|
|
@@ -9,11 +9,9 @@ export class AzurePulumiClientStrategy {
|
|
|
9
9
|
stackName: args.stackName,
|
|
10
10
|
workDir: args.workDir,
|
|
11
11
|
}, {
|
|
12
|
-
envVars:
|
|
13
|
-
...Object.fromEntries(Object.entries(args.envs).filter((entry) => entry[1] !== undefined)),
|
|
14
|
-
},
|
|
12
|
+
envVars: Object.fromEntries(Object.entries(args.envs).filter((entry) => entry[1] !== undefined)),
|
|
15
13
|
});
|
|
16
|
-
return new
|
|
14
|
+
return new LocalWorkspacePulumiClientStrategy(stack);
|
|
17
15
|
}
|
|
18
16
|
async up() {
|
|
19
17
|
return this.stack.up({
|
|
@@ -21,11 +19,17 @@ export class AzurePulumiClientStrategy {
|
|
|
21
19
|
refresh: false,
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
|
-
async preview(
|
|
22
|
+
async preview(args) {
|
|
23
|
+
const { diff } = args ?? { diff: false };
|
|
25
24
|
return this.stack.preview({
|
|
26
25
|
color: "never",
|
|
27
26
|
refresh: false,
|
|
28
27
|
diff,
|
|
29
28
|
});
|
|
30
29
|
}
|
|
30
|
+
async refresh() {
|
|
31
|
+
return this.stack.refresh({
|
|
32
|
+
color: "never",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
31
35
|
}
|
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.49",
|
|
7
7
|
"repository": {
|
|
8
8
|
"url": "git+https://github.com/tahminator/pipeline.git"
|
|
9
9
|
},
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type PreviewResult, type UpResult } from "@pulumi/pulumi/automation";
|
|
2
|
-
import type { PulumiClientAzureStrategyArgs } from "../types";
|
|
3
|
-
import type { IPulumiClientStrategy } from "./types";
|
|
4
|
-
export declare class AzurePulumiClientStrategy implements IPulumiClientStrategy {
|
|
5
|
-
private readonly stack;
|
|
6
|
-
private constructor();
|
|
7
|
-
static create(args: PulumiClientAzureStrategyArgs): Promise<AzurePulumiClientStrategy>;
|
|
8
|
-
up(): Promise<UpResult>;
|
|
9
|
-
preview({ diff }: {
|
|
10
|
-
diff: boolean;
|
|
11
|
-
}): Promise<PreviewResult>;
|
|
12
|
-
}
|