@sdlcworks/components 0.0.12 → 0.0.14
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/index.d.ts +10 -16
- package/dist/index.js +11 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { Input as PulumiInput, Output as PulumiOutput } from '@pulumi/pulumi';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
|
-
declare enum CloudProvider {
|
|
6
|
+
export declare enum CloudProvider {
|
|
7
7
|
aws = "aws",
|
|
8
8
|
gcloud = "gcloud",
|
|
9
9
|
azure = "azure",
|
|
@@ -11,13 +11,6 @@ declare enum CloudProvider {
|
|
|
11
11
|
hetzner = "hetzner",
|
|
12
12
|
cloudflare = "cloudflare"
|
|
13
13
|
}
|
|
14
|
-
declare const InfraComponentOutputSchema = z.object({
|
|
15
|
-
service_name: z.string().nullable().optional(),
|
|
16
|
-
public_url: z.string().nullable().optional(),
|
|
17
|
-
env_outputs: z.array(z.string()).default([]),
|
|
18
|
-
resource_urns: z.array(z.string()),
|
|
19
|
-
});
|
|
20
|
-
export type InfraComponentOutput = z.infer<typeof InfraComponentOutputSchema>;
|
|
21
14
|
export declare enum DeploymentArtifactType {
|
|
22
15
|
container_image = "container_image"
|
|
23
16
|
}
|
|
@@ -117,6 +110,13 @@ export type InfraComponentInputs<C, D> = {
|
|
|
117
110
|
config: C;
|
|
118
111
|
deploymentInput: D;
|
|
119
112
|
};
|
|
113
|
+
export type DeploymentInfo = {
|
|
114
|
+
config: Record<string, any>;
|
|
115
|
+
artifact: {
|
|
116
|
+
uri: string;
|
|
117
|
+
type: DeploymentArtifactType;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
120
|
export type ProviderPulumiCtx<I, S> = {
|
|
121
121
|
componentName: string;
|
|
122
122
|
$: {
|
|
@@ -126,6 +126,7 @@ export type ProviderPulumiCtx<I, S> = {
|
|
|
126
126
|
inputs: I;
|
|
127
127
|
state: S;
|
|
128
128
|
declareConnectionInterfaces: DeclareConnectionInterfacesFn;
|
|
129
|
+
buildArtifacts: Record<string, DeploymentInfo>;
|
|
129
130
|
};
|
|
130
131
|
/**
|
|
131
132
|
* Context passed to connection handlers.
|
|
@@ -153,14 +154,7 @@ export type ConnectionHandlerEntry<S, ConnectionType extends string, C extends C
|
|
|
153
154
|
};
|
|
154
155
|
export type ProviderDeployCtx<D, S> = {
|
|
155
156
|
state: S;
|
|
156
|
-
} & Record<string,
|
|
157
|
-
provisionOutput: InfraComponentOutput;
|
|
158
|
-
deploymentConfig: D;
|
|
159
|
-
deploymentArtifact: {
|
|
160
|
-
uri: string;
|
|
161
|
-
type: DeploymentArtifactType;
|
|
162
|
-
};
|
|
163
|
-
}>;
|
|
157
|
+
} & Record<string, DeploymentInfo>;
|
|
164
158
|
export type ProviderPulumiFn<I, S, O> = (ctx: ProviderPulumiCtx<I, S>) => Promise<O>;
|
|
165
159
|
export type ProviderDeployFn<D, S> = (ctx: ProviderDeployCtx<D, S>) => Promise<void>;
|
|
166
160
|
declare const emptyStateSchema: z.ZodObject<{}, z.core.$strip>;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
// src/infra.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import * as pulumi from "@pulumi/pulumi";
|
|
4
|
+
var CloudProvider;
|
|
5
|
+
((CloudProvider2) => {
|
|
6
|
+
CloudProvider2["aws"] = "aws";
|
|
7
|
+
CloudProvider2["gcloud"] = "gcloud";
|
|
8
|
+
CloudProvider2["azure"] = "azure";
|
|
9
|
+
CloudProvider2["linode"] = "linode";
|
|
10
|
+
CloudProvider2["hetzner"] = "hetzner";
|
|
11
|
+
CloudProvider2["cloudflare"] = "cloudflare";
|
|
12
|
+
})(CloudProvider ||= {});
|
|
4
13
|
var DeploymentArtifactType;
|
|
5
14
|
((DeploymentArtifactType2) => {
|
|
6
15
|
DeploymentArtifactType2["container_image"] = "container_image";
|
|
@@ -95,5 +104,6 @@ export {
|
|
|
95
104
|
createConnectionInterface,
|
|
96
105
|
InfraComponent,
|
|
97
106
|
DeploymentArtifactType,
|
|
98
|
-
ConnectionInterface
|
|
107
|
+
ConnectionInterface,
|
|
108
|
+
CloudProvider
|
|
99
109
|
};
|