@gradientedge/cdk-utils-azure 2.2.0 → 2.4.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.
@@ -48,7 +48,7 @@ export class CommonAzureConstruct extends ComponentResource {
48
48
  storageManager;
49
49
  commonLogAnalyticsWorkspace;
50
50
  constructor(name, props, options) {
51
- super(`azure:${name}`, name, props, options);
51
+ super(`construct:${name}`, name, props, options);
52
52
  this.props = props;
53
53
  this.options = options;
54
54
  this.id = name;
@@ -26,7 +26,7 @@ export class CommonAzureStack extends ComponentResource {
26
26
  props;
27
27
  config;
28
28
  constructor(name, props, options) {
29
- super(`custom:azure:Stack:${name}`, name, props, options);
29
+ super(`stack:${name}`, name, props, options);
30
30
  /* initialise config */
31
31
  this.config = new Config();
32
32
  this.props = this.determineConstructProps(props);
@@ -44,8 +44,8 @@ export class CommonAzureStack extends ComponentResource {
44
44
  return {
45
45
  ...props,
46
46
  extraContexts: this.config.getObject('extraContexts'),
47
- stage: this.config.require('stage'),
48
- stageContextPath: this.config.require('stageContextPath'),
47
+ stage: this.config.get('stage'),
48
+ stageContextPath: this.config.get('stageContextPath'),
49
49
  ...this.determineExtraContexts(),
50
50
  ...this.determineStageContexts(),
51
51
  };
@@ -88,10 +88,10 @@ export class CommonAzureStack extends ComponentResource {
88
88
  */
89
89
  determineStageContexts() {
90
90
  const debug = this.config.getBoolean('debug');
91
- const stage = this.config.require('stage');
91
+ const stage = this.config.get('stage');
92
92
  const stageContextPath = this.config.get('stageContextPath');
93
93
  const stageContextFilePath = path.join(appRoot.path, stageContextPath ?? 'env', `${stage}.json`);
94
- if (isDevStage(stage)) {
94
+ if (stage && isDevStage(stage)) {
95
95
  if (debug)
96
96
  console.debug(`Development stage. Using default stage context properties`);
97
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils-azure",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",