@byaga/cdk-patterns 0.11.4 → 0.11.5

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.
@@ -154,6 +154,5 @@ export class StaticWebSite {
154
154
  ]
155
155
  }
156
156
  }]
157
- }
158
- }
157
+ } }
159
158
  }
@@ -13,14 +13,14 @@ export interface StackArguments extends StackProps {
13
13
  region: string;
14
14
  }
15
15
  /**
16
- * Interface for the deploy stack.
16
+ * Interface for the stack.
17
17
  */
18
- export interface DeployStack {
18
+ export interface DeployStack<T extends StackConfiguration> {
19
19
  stack: Stack;
20
20
  name: string;
21
21
  stage: string;
22
22
  project: string;
23
- config: StackConfiguration;
23
+ config: Partial<T>;
24
24
  }
25
25
  /**
26
26
  * Creates a new stack.
@@ -28,13 +28,13 @@ export interface DeployStack {
28
28
  * @param {StackArguments} props - The arguments for creating the stack.
29
29
  * @returns {DeployStack} The created stack.
30
30
  */
31
- export declare function createStack(scope: IConstruct, props: StackArguments): DeployStack;
31
+ export declare function createStack<T extends StackConfiguration>(scope: IConstruct, props: StackArguments): DeployStack<T>;
32
32
  /**
33
33
  * Helpful method to get the 'current' stack that is being defined. Hopefully this will reduce the need to pass the stack around everywhere.
34
34
  */
35
- export declare function getCurrentStack(): DeployStack;
35
+ export declare function getCurrentStack<T extends StackConfiguration>(): DeployStack<T>;
36
36
  /**
37
37
  * This sets the 'current' stack. This should be automatic everywhere, but in case something goes wrong here is a way to force the issue
38
38
  * @param stack
39
39
  */
40
- export declare function setCurrentStack(stack: DeployStack): DeployStack;
40
+ export declare function setCurrentStack<T extends StackConfiguration>(stack: DeployStack<T>): DeployStack<T>;
@@ -9,4 +9,4 @@ export interface StackConfiguration {
9
9
  * @param {string} stage - The stage for which to load the configuration. Defaults to the value of the STAGE environment variable, or "develop" if STAGE is not set.
10
10
  * @returns {StackConfiguration} The loaded configuration.
11
11
  */
12
- export declare function loadConfiguration(stage?: string): StackConfiguration;
12
+ export declare function loadConfiguration<T extends StackConfiguration>(stage?: string): Partial<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byaga/cdk-patterns",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
4
4
  "description": "Collection of common patterns used when making AWS CloudFormation templates using CDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",