@gradientedge/cdk-utils 8.75.0 → 8.76.0

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.
@@ -83,3 +83,4 @@ export declare class CommonConstruct extends Construct {
83
83
  */
84
84
  isProductionStage: () => boolean;
85
85
  }
86
+ export declare const applyMixins: (derivedCtor: any, constructors: any[]) => void;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.CommonConstruct = void 0;
26
+ exports.applyMixins = exports.CommonConstruct = void 0;
27
27
  const constructs_1 = require("constructs");
28
28
  const aws = __importStar(require("../manager/aws"));
29
29
  const utils = __importStar(require("../utils"));
@@ -147,3 +147,11 @@ class CommonConstruct extends constructs_1.Construct {
147
147
  isProductionStage = () => utils.isPrdStage(this.props.stage);
148
148
  }
149
149
  exports.CommonConstruct = CommonConstruct;
150
+ const applyMixins = (derivedCtor, constructors) => {
151
+ constructors.forEach(baseCtor => {
152
+ Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
153
+ Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype, name) || Object.create(null));
154
+ });
155
+ });
156
+ };
157
+ exports.applyMixins = applyMixins;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.75.0",
3
+ "version": "8.76.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -3,7 +3,6 @@ import { Construct } from 'constructs'
3
3
  import * as aws from '../manager/aws'
4
4
  import * as types from '../types'
5
5
  import * as utils from '../utils'
6
- import { EfsManager } from '../manager/aws/efs-manager'
7
6
 
8
7
  /**
9
8
  * @stability stable
@@ -133,3 +132,15 @@ export class CommonConstruct extends Construct {
133
132
  */
134
133
  public isProductionStage = () => utils.isPrdStage(this.props.stage)
135
134
  }
135
+
136
+ export const applyMixins = (derivedCtor: any, constructors: any[]) => {
137
+ constructors.forEach(baseCtor => {
138
+ Object.getOwnPropertyNames(baseCtor.prototype).forEach(name => {
139
+ Object.defineProperty(
140
+ derivedCtor.prototype,
141
+ name,
142
+ Object.getOwnPropertyDescriptor(baseCtor.prototype, name) || Object.create(null)
143
+ )
144
+ })
145
+ })
146
+ }