@gradientedge/cdk-utils-azure 2.49.0 → 2.51.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.
- package/dist/src/common/construct.d.ts +0 -4
- package/dist/src/common/construct.js +0 -9
- package/dist/src/common/stack.d.ts +1 -1
- package/dist/src/construct/event-handler/main.d.ts +0 -5
- package/dist/src/construct/event-handler/main.js +2 -13
- package/dist/src/construct/event-handler/types.d.ts +0 -8
- package/package.json +2 -2
|
@@ -101,10 +101,6 @@ export declare class CommonAzureConstruct extends ComponentResource {
|
|
|
101
101
|
* - No-op if commonLogAnalyticsWorkspace is not configured in props
|
|
102
102
|
*/
|
|
103
103
|
protected resolveCommonLogAnalyticsWorkspace(): void;
|
|
104
|
-
/**
|
|
105
|
-
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
106
|
-
*/
|
|
107
|
-
protected determineFullyQualifiedDomain(): void;
|
|
108
104
|
/**
|
|
109
105
|
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
110
106
|
* This is determined by the stage property injected via cdk context
|
|
@@ -100,7 +100,6 @@ export class CommonAzureConstruct extends ComponentResource {
|
|
|
100
100
|
this.securityCentermanager = new AzureSecurityCentermanager();
|
|
101
101
|
this.serviceBusManager = new AzureServiceBusManager();
|
|
102
102
|
this.storageManager = new AzureStorageManager();
|
|
103
|
-
this.determineFullyQualifiedDomain();
|
|
104
103
|
}
|
|
105
104
|
/**
|
|
106
105
|
* @summary Resolve a Pulumi stack reference for cross-stack outputs
|
|
@@ -146,14 +145,6 @@ export class CommonAzureConstruct extends ComponentResource {
|
|
|
146
145
|
resourceGroupName: this.props.commonLogAnalyticsWorkspace.resourceGroupName,
|
|
147
146
|
});
|
|
148
147
|
}
|
|
149
|
-
/**
|
|
150
|
-
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
151
|
-
*/
|
|
152
|
-
determineFullyQualifiedDomain() {
|
|
153
|
-
this.fullyQualifiedDomainName = this.props.subDomain
|
|
154
|
-
? `${this.props.subDomain}.${this.props.domainName}`
|
|
155
|
-
: this.props.domainName;
|
|
156
|
-
}
|
|
157
148
|
/**
|
|
158
149
|
* @summary Utility method to determine if the initialisation is in development (dev) stage
|
|
159
150
|
* This is determined by the stage property injected via cdk context
|
|
@@ -79,7 +79,7 @@ export declare class CommonAzureStack extends ComponentResource {
|
|
|
79
79
|
/**
|
|
80
80
|
* @summary Determine the fully qualified domain name based on domainName & subDomain
|
|
81
81
|
*/
|
|
82
|
-
protected fullyQualifiedDomain(): string;
|
|
82
|
+
protected fullyQualifiedDomain(): string | undefined;
|
|
83
83
|
/**
|
|
84
84
|
* @summary Walk up the directory tree to locate the infrastructure root containing the stage context path
|
|
85
85
|
* @returns The directory path containing the stage context configuration
|
|
@@ -18,9 +18,6 @@ import { AzureEventHandlerProps, EventHandlerEventGridSubscription, EventHandler
|
|
|
18
18
|
* | `true` | `true` | Look up both. Cross-stack pattern where the producer/owner of the queue is a different stack (e.g. `WebhookEventHandler` consuming a queue created by `WebhookGateway`). |
|
|
19
19
|
* | `false` | `true` | **Invalid** — construct-time error. You cannot resolve an existing queue under a namespace the construct is creating. |
|
|
20
20
|
*
|
|
21
|
-
* The top-level `serviceBus.useExisting` flag is retained as a deprecated alias that sets both
|
|
22
|
-
* per-resource flags to the same value, so existing callers continue to work unchanged.
|
|
23
|
-
*
|
|
24
21
|
* ## Authorization and the `EVENT_INGEST_SERVICE_BUS` connection string
|
|
25
22
|
*
|
|
26
23
|
* When the construct owns the queue (`queue.useExisting=false`), it provisions a per-queue
|
|
@@ -99,8 +96,6 @@ export declare class AzureEventHandler extends AzureFunctionApp {
|
|
|
99
96
|
/**
|
|
100
97
|
* @summary Resolve effective `useExisting` flags for the Service Bus namespace and queue.
|
|
101
98
|
*
|
|
102
|
-
* Per-resource flags (`namespace.useExisting`, `queue.useExisting`) take precedence over the
|
|
103
|
-
* deprecated top-level `serviceBus.useExisting`, which is treated as an alias that sets both.
|
|
104
99
|
* Throws if the invalid combination (namespace.useExisting=false + queue.useExisting=true) is
|
|
105
100
|
* requested — a queue cannot be looked up under a namespace the construct is about to create.
|
|
106
101
|
*/
|
|
@@ -19,9 +19,6 @@ import { AzureFunctionApp } from '../function-app/index.js';
|
|
|
19
19
|
* | `true` | `true` | Look up both. Cross-stack pattern where the producer/owner of the queue is a different stack (e.g. `WebhookEventHandler` consuming a queue created by `WebhookGateway`). |
|
|
20
20
|
* | `false` | `true` | **Invalid** — construct-time error. You cannot resolve an existing queue under a namespace the construct is creating. |
|
|
21
21
|
*
|
|
22
|
-
* The top-level `serviceBus.useExisting` flag is retained as a deprecated alias that sets both
|
|
23
|
-
* per-resource flags to the same value, so existing callers continue to work unchanged.
|
|
24
|
-
*
|
|
25
22
|
* ## Authorization and the `EVENT_INGEST_SERVICE_BUS` connection string
|
|
26
23
|
*
|
|
27
24
|
* When the construct owns the queue (`queue.useExisting=false`), it provisions a per-queue
|
|
@@ -137,20 +134,12 @@ export class AzureEventHandler extends AzureFunctionApp {
|
|
|
137
134
|
/**
|
|
138
135
|
* @summary Resolve effective `useExisting` flags for the Service Bus namespace and queue.
|
|
139
136
|
*
|
|
140
|
-
* Per-resource flags (`namespace.useExisting`, `queue.useExisting`) take precedence over the
|
|
141
|
-
* deprecated top-level `serviceBus.useExisting`, which is treated as an alias that sets both.
|
|
142
137
|
* Throws if the invalid combination (namespace.useExisting=false + queue.useExisting=true) is
|
|
143
138
|
* requested — a queue cannot be looked up under a namespace the construct is about to create.
|
|
144
139
|
*/
|
|
145
140
|
resolveServiceBusUseExisting() {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
// (see EventHandlerServiceBusProps.useExisting in types.ts).
|
|
149
|
-
const deprecatedServiceBusUseExisting = this.props.serviceBus?.useExisting;
|
|
150
|
-
const namespaceUseExisting = this.props.serviceBus?.namespace?.useExisting;
|
|
151
|
-
const queueUseExisting = this.props.serviceBus?.queue?.useExisting;
|
|
152
|
-
const namespace = namespaceUseExisting ?? deprecatedServiceBusUseExisting ?? false;
|
|
153
|
-
const queue = queueUseExisting ?? deprecatedServiceBusUseExisting ?? false;
|
|
141
|
+
const namespace = this.props.serviceBus?.namespace?.useExisting ?? false;
|
|
142
|
+
const queue = this.props.serviceBus?.queue?.useExisting ?? false;
|
|
154
143
|
if (!namespace && queue) {
|
|
155
144
|
throw new Error(`[${this.id}] invalid serviceBus configuration: queue.useExisting=true requires namespace.useExisting=true ` +
|
|
156
145
|
`(cannot resolve an existing queue under a namespace the construct is creating).`);
|
|
@@ -61,14 +61,6 @@ export interface EventHandlerServiceBusProps {
|
|
|
61
61
|
namespace?: EventHandlerServiceBusNamespaceProps;
|
|
62
62
|
/** Service Bus queue properties (extends {@link ServiceBusQueueProps} with `useExisting`) */
|
|
63
63
|
queue?: EventHandlerServiceBusQueueProps;
|
|
64
|
-
/**
|
|
65
|
-
* Convenience alias that sets both `namespace.useExisting` and `queue.useExisting` to the same value.
|
|
66
|
-
* @deprecated Prefer `namespace.useExisting` and `queue.useExisting` individually. Retained as an alias
|
|
67
|
-
* so existing callers (e.g. WebhookEventHandler) continue to compile unchanged.
|
|
68
|
-
* TODO: remove once all callers have migrated to the per-resource flags. Also remove the
|
|
69
|
-
* resolution fallback in `resolveServiceBusUseExisting()` in main.ts.
|
|
70
|
-
*/
|
|
71
|
-
useExisting?: boolean;
|
|
72
64
|
}
|
|
73
65
|
/**
|
|
74
66
|
* Provisioned Service Bus resources for the event handler
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils-azure",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.51.0",
|
|
4
4
|
"description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"lodash": "4.18.1",
|
|
24
24
|
"uuid": "14.0.0",
|
|
25
25
|
"yaml": "2.9.0",
|
|
26
|
-
"@gradientedge/cdk-utils-common": "2.
|
|
26
|
+
"@gradientedge/cdk-utils-common": "2.10.0"
|
|
27
27
|
},
|
|
28
28
|
"keywords": [
|
|
29
29
|
"gradientedge",
|