@squiz/dx-common-lib 1.72.0 → 1.72.3

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/lib/events/EventBusService.d.ts +107 -0
  3. package/lib/events/EventBusService.js +196 -0
  4. package/lib/events/EventBusService.js.map +1 -0
  5. package/lib/events/EventBusService.spec.d.ts +1 -0
  6. package/lib/events/EventBusService.spec.js +527 -0
  7. package/lib/events/EventBusService.spec.js.map +1 -0
  8. package/lib/index.d.ts +5 -0
  9. package/lib/index.js +5 -0
  10. package/lib/index.js.map +1 -1
  11. package/lib/secret-api-key-service/DevSecretApiKeyService.d.ts +25 -0
  12. package/lib/secret-api-key-service/DevSecretApiKeyService.js +35 -0
  13. package/lib/secret-api-key-service/DevSecretApiKeyService.js.map +1 -0
  14. package/lib/secret-api-key-service/DevSecretApiKeyService.spec.d.ts +1 -0
  15. package/lib/secret-api-key-service/DevSecretApiKeyService.spec.js +157 -0
  16. package/lib/secret-api-key-service/DevSecretApiKeyService.spec.js.map +1 -0
  17. package/lib/secret-api-key-service/SecretApiKeyService.d.ts +0 -9
  18. package/lib/secret-api-key-service/SecretApiKeyService.js +0 -7
  19. package/lib/secret-api-key-service/SecretApiKeyService.js.map +1 -1
  20. package/lib/secret-api-key-service/SecretApiKeyService.spec.js +0 -37
  21. package/lib/secret-api-key-service/SecretApiKeyService.spec.js.map +1 -1
  22. package/lib/secret-api-key-service/getSecretApiKeyService.d.ts +20 -0
  23. package/lib/secret-api-key-service/getSecretApiKeyService.js +41 -0
  24. package/lib/secret-api-key-service/getSecretApiKeyService.js.map +1 -0
  25. package/lib/secret-api-key-service/getSecretApiKeyService.spec.d.ts +1 -0
  26. package/lib/secret-api-key-service/getSecretApiKeyService.spec.js +313 -0
  27. package/lib/secret-api-key-service/getSecretApiKeyService.spec.js.map +1 -0
  28. package/lib/stream/EventStreamHandler.d.ts +38 -0
  29. package/lib/stream/EventStreamHandler.js +128 -0
  30. package/lib/stream/EventStreamHandler.js.map +1 -0
  31. package/lib/stream/EventStreamHandler.spec.d.ts +1 -0
  32. package/lib/stream/EventStreamHandler.spec.js +364 -0
  33. package/lib/stream/EventStreamHandler.spec.js.map +1 -0
  34. package/lib/stream/StreamUtils.d.ts +38 -0
  35. package/lib/stream/StreamUtils.js +59 -0
  36. package/lib/stream/StreamUtils.js.map +1 -0
  37. package/lib/stream/StreamUtils.spec.d.ts +1 -0
  38. package/lib/stream/StreamUtils.spec.js +92 -0
  39. package/lib/stream/StreamUtils.spec.js.map +1 -0
  40. package/package.json +3 -2
  41. package/src/events/EventBusService.spec.ts +707 -0
  42. package/src/events/EventBusService.ts +316 -0
  43. package/src/index.ts +5 -0
  44. package/src/secret-api-key-service/DevSecretApiKeyService.spec.ts +211 -0
  45. package/src/secret-api-key-service/DevSecretApiKeyService.ts +36 -0
  46. package/src/secret-api-key-service/SecretApiKeyService.spec.ts +0 -46
  47. package/src/secret-api-key-service/SecretApiKeyService.ts +0 -13
  48. package/src/secret-api-key-service/getSecretApiKeyService.spec.ts +405 -0
  49. package/src/secret-api-key-service/getSecretApiKeyService.ts +45 -0
  50. package/src/stream/EventStreamHandler.spec.ts +440 -0
  51. package/src/stream/EventStreamHandler.ts +192 -0
  52. package/src/stream/StreamUtils.spec.ts +113 -0
  53. package/src/stream/StreamUtils.ts +58 -0
  54. package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.72.3
4
+
5
+ ### Patch Changes
6
+
7
+ - d695536: Add event and event stream utils
8
+
9
+ ## 1.72.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Add events and event stream utils
14
+
15
+ ## 1.72.1
16
+
17
+ ### Patch Changes
18
+
19
+ - fabc58b: Added EnvApiKeyService fallback
20
+
3
21
  ## 1.72.0
4
22
 
5
23
  ### Minor Changes
@@ -0,0 +1,107 @@
1
+ /*!
2
+ * @license
3
+ * Copyright Squiz Australia Pty Ltd. All Rights Reserved.
4
+ */
5
+ import { Logger } from '@squiz/dx-logger-lib';
6
+ export interface EventBusConfig {
7
+ eventBusUrl: string;
8
+ eventBusKey: string;
9
+ tenantId?: string;
10
+ deploymentEnvironment: string;
11
+ squizRegion: string;
12
+ }
13
+ /** Matches DXP Event Bus POST /events envelope (flat `metadata` + `event`, not nested under `detail`). */
14
+ export interface EventBusEvent {
15
+ source: string;
16
+ 'detail-type': string;
17
+ action: string;
18
+ eventTime: string;
19
+ metadata: {
20
+ tenantID: string;
21
+ /** Deployment label, e.g. `dev` / `uat` / `prod` (from `EventBusConfig.deploymentEnvironment`). */
22
+ environment: string;
23
+ region: string;
24
+ };
25
+ event: object;
26
+ }
27
+ export interface EventBusResponse {
28
+ statusCode: number;
29
+ event: {
30
+ id: string;
31
+ source: string;
32
+ detailType: string;
33
+ time: string;
34
+ detail: {
35
+ metadata: {
36
+ action: string;
37
+ tenantID: string;
38
+ eventTime: string;
39
+ };
40
+ event: object;
41
+ };
42
+ };
43
+ }
44
+ export type EventBusApiResponse = Array<EventBusResponse>;
45
+ export interface EventBusServiceInterface {
46
+ /**
47
+ * Publishes a single event to the Event Bus via HTTP POST.
48
+ * @param detailType The type of the event (e.g., 'component.change.create')
49
+ * @param detail The event payload
50
+ * @returns The API response containing event IDs and status codes
51
+ * @throws Error if configuration is missing or API call fails
52
+ */
53
+ publishEvent(detailType: string, detail: object): Promise<EventBusApiResponse>;
54
+ /**
55
+ * Publishes a single event with safe error handling and response validation.
56
+ * Catches errors and logs them without throwing, so it doesn't break the calling flow.
57
+ * Validates that the API returned valid status codes for all events.
58
+ * @param detailType The type of the event (e.g., 'component.change.create')
59
+ * @param detail The event payload
60
+ */
61
+ publishEventSafely(detailType: string, detail: object): Promise<void>;
62
+ /**
63
+ * Publishes multiple events to the Event Bus via HTTP POST in a single request.
64
+ * @param events Array of events with detailType and detail payload
65
+ * @returns The API response containing event IDs and status codes
66
+ * @throws Error if configuration is missing or API call fails
67
+ */
68
+ publishEvents(events: Array<{
69
+ detailType: string;
70
+ detail: object;
71
+ }>): Promise<EventBusApiResponse>;
72
+ /**
73
+ * Publishes multiple events with safe error handling and response validation.
74
+ * Catches errors and logs them without throwing, so it doesn't break the calling flow.
75
+ * @param events Array of events with detailType and detail payload
76
+ */
77
+ publishEventsSafely(events: Array<{
78
+ detailType: string;
79
+ detail: object;
80
+ }>): Promise<void>;
81
+ }
82
+ export declare class EventBusService implements EventBusServiceInterface {
83
+ private logger;
84
+ private config;
85
+ private readonly validStatusCodes;
86
+ constructor(logger: Logger, config: EventBusConfig);
87
+ setTenantId(tenantId: string): void;
88
+ /**
89
+ * Throws with a specific message so operators know whether URL, API key, or tenant context is missing.
90
+ */
91
+ private ensureEventBusCredentials;
92
+ private ensureTenantId;
93
+ private eventBusPostUrl;
94
+ /** Safe when URL is unset (e.g. logging after a config error). */
95
+ private safeEventBusEndpointForLog;
96
+ private postToEventBus;
97
+ publishEvent(detailType: string, detail: object): Promise<EventBusApiResponse>;
98
+ publishEvents(events: Array<{
99
+ detailType: string;
100
+ detail: object;
101
+ }>): Promise<EventBusApiResponse>;
102
+ publishEventSafely(detailType: string, detail: object): Promise<void>;
103
+ publishEventsSafely(events: Array<{
104
+ detailType: string;
105
+ detail: object;
106
+ }>): Promise<void>;
107
+ }
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventBusService = void 0;
4
+ /** Response bodies can be huge; keep previews bounded. */
5
+ const MAX_RESPONSE_BODY_LOG_CHARS = 16384;
6
+ /**
7
+ * Request body is the exact JSON string sent to `POST …/events` — log it in full for debugging unless enormous.
8
+ * (CloudWatch/Lambda still have per-line limits; this cap avoids pathological cases.)
9
+ */
10
+ const MAX_REQUEST_BODY_LOG_CHARS = 512 * 1024;
11
+ function isMissing(value) {
12
+ return value === undefined || value.trim() === '';
13
+ }
14
+ function truncateForLog(value, max) {
15
+ if (value.length <= max) {
16
+ return value;
17
+ }
18
+ return `${value.slice(0, max)}… [truncated, ${value.length - max} more chars]`;
19
+ }
20
+ /** Full outbound payload for logs (same bytes as fetch `body`), with a rare size cap. */
21
+ function requestBodyForLog(body) {
22
+ if (body.length <= MAX_REQUEST_BODY_LOG_CHARS) {
23
+ return body;
24
+ }
25
+ return truncateForLog(body, MAX_REQUEST_BODY_LOG_CHARS);
26
+ }
27
+ class EventBusService {
28
+ constructor(logger, config) {
29
+ this.logger = logger;
30
+ this.config = config;
31
+ this.validStatusCodes = [200, 201, 202];
32
+ }
33
+ setTenantId(tenantId) {
34
+ this.config.tenantId = tenantId;
35
+ }
36
+ /**
37
+ * Throws with a specific message so operators know whether URL, API key, or tenant context is missing.
38
+ */
39
+ ensureEventBusCredentials() {
40
+ const missing = [];
41
+ if (isMissing(this.config.eventBusUrl)) {
42
+ missing.push('EVENT_BUS_URL (Event Bus base URL; Lambda receives this at deploy time)');
43
+ }
44
+ if (isMissing(this.config.eventBusKey)) {
45
+ missing.push('EVENT_BUS_KEY (API key sent as x-api-key; set via CDK/CI or Lambda env)');
46
+ }
47
+ if (missing.length > 0) {
48
+ throw new Error(`Event Bus is not configured: missing ${missing.join(' and ')}.`);
49
+ }
50
+ }
51
+ ensureTenantId() {
52
+ if (isMissing(this.config.tenantId)) {
53
+ throw new Error('Tenant ID is not set. The stream processor must call setTenantId before publishing (x-dxp-tenant header).');
54
+ }
55
+ }
56
+ eventBusPostUrl() {
57
+ const base = this.config.eventBusUrl.replace(/\/+$/, '');
58
+ return `${base}/events`;
59
+ }
60
+ /** Safe when URL is unset (e.g. logging after a config error). */
61
+ safeEventBusEndpointForLog() {
62
+ if (isMissing(this.config.eventBusUrl)) {
63
+ return undefined;
64
+ }
65
+ return this.eventBusPostUrl();
66
+ }
67
+ async postToEventBus(eventsPayload) {
68
+ const url = this.eventBusPostUrl();
69
+ const body = JSON.stringify(eventsPayload);
70
+ const headers = {
71
+ 'x-api-key': this.config.eventBusKey,
72
+ 'x-dxp-tenant': this.config.tenantId,
73
+ 'Content-Type': 'application/json',
74
+ };
75
+ const headersForLog = { ...headers, 'x-api-key': '[REDACTED]' };
76
+ let response;
77
+ try {
78
+ response = await fetch(url, { method: 'POST', headers, body });
79
+ }
80
+ catch (err) {
81
+ this.logger.error('Event Bus request failed before HTTP response (network/DNS/TLS)', {
82
+ eventBusEndpoint: url,
83
+ method: 'POST',
84
+ tenantId: this.config.tenantId,
85
+ /** Exact JSON sent as the fetch body (see `requestBodyForLog` for rare truncation). */
86
+ requestBody: requestBodyForLog(body),
87
+ headers: headersForLog,
88
+ error: err instanceof Error ? err.message : String(err),
89
+ });
90
+ throw err;
91
+ }
92
+ if (!response.ok) {
93
+ const responseText = await response.text();
94
+ const responsePreview = truncateForLog(responseText, MAX_RESPONSE_BODY_LOG_CHARS);
95
+ this.logger.error('Event Bus API returned a non-success HTTP status', {
96
+ eventBusEndpoint: url,
97
+ httpStatus: response.status,
98
+ httpStatusText: response.statusText,
99
+ tenantId: this.config.tenantId,
100
+ /** Full outbound JSON (same as HTTP body); large payloads may be truncated — see `requestBodyForLog`. */
101
+ requestBody: requestBodyForLog(body),
102
+ responseBodyPreview: responsePreview,
103
+ headers: headersForLog,
104
+ });
105
+ throw new Error(`Event Bus API error: HTTP ${response.status} ${response.statusText} for POST ${url}. Response body (preview): ${responsePreview}`);
106
+ }
107
+ return (await response.json());
108
+ }
109
+ async publishEvent(detailType, detail) {
110
+ this.ensureEventBusCredentials();
111
+ this.ensureTenantId();
112
+ const eventTime = new Date().toISOString();
113
+ const event = {
114
+ source: 'component-service',
115
+ 'detail-type': detailType,
116
+ action: detailType,
117
+ eventTime,
118
+ metadata: {
119
+ tenantID: this.config.tenantId,
120
+ environment: this.config.deploymentEnvironment,
121
+ region: this.config.squizRegion,
122
+ },
123
+ event: detail,
124
+ };
125
+ const eventsPayload = [event];
126
+ return this.postToEventBus(eventsPayload);
127
+ }
128
+ async publishEvents(events) {
129
+ this.ensureEventBusCredentials();
130
+ if (events.length === 0) {
131
+ return [];
132
+ }
133
+ this.ensureTenantId();
134
+ const eventTime = new Date().toISOString();
135
+ const eventsPayload = events.map(({ detailType, detail }) => ({
136
+ source: 'component-service',
137
+ 'detail-type': detailType,
138
+ action: detailType,
139
+ eventTime,
140
+ metadata: {
141
+ tenantID: this.config.tenantId,
142
+ environment: this.config.deploymentEnvironment,
143
+ region: this.config.squizRegion,
144
+ },
145
+ event: detail,
146
+ }));
147
+ return this.postToEventBus(eventsPayload);
148
+ }
149
+ async publishEventSafely(detailType, detail) {
150
+ try {
151
+ const response = await this.publishEvent(detailType, detail);
152
+ const failedEvents = response.filter((eventResponse) => !this.validStatusCodes.includes(eventResponse.statusCode));
153
+ if (failedEvents.length > 0) {
154
+ const failedStatuses = failedEvents.map((e) => e.statusCode).join(', ');
155
+ this.logger.error(`Event publishing failed: received non-valid status codes [${failedStatuses}] for event ${detailType}`);
156
+ return;
157
+ }
158
+ const eventIds = response.map((eventResponse) => eventResponse.event.id).join(', ');
159
+ this.logger.info(`Successfully published event: ${detailType} with IDs [${eventIds}] to ${this.config.eventBusUrl}/events`);
160
+ }
161
+ catch (e) {
162
+ const errorMessage = `Failed to publish event ${detailType} to event bus: ${e instanceof Error ? e.message : typeof e === 'string' ? e : JSON.stringify(e)}`;
163
+ this.logger.error(errorMessage, {
164
+ detailType,
165
+ tenantId: this.config.tenantId,
166
+ eventBusEndpoint: this.safeEventBusEndpointForLog(),
167
+ });
168
+ }
169
+ }
170
+ async publishEventsSafely(events) {
171
+ try {
172
+ const response = await this.publishEvents(events);
173
+ const failedEvents = response.filter((eventResponse) => !this.validStatusCodes.includes(eventResponse.statusCode));
174
+ if (failedEvents.length > 0) {
175
+ const failedStatuses = failedEvents.map((e) => e.statusCode).join(', ');
176
+ const errorMessage = `Event publishing failed: received non-valid status codes [${failedStatuses}] for batch of ${events.length} events`;
177
+ this.logger.error(errorMessage);
178
+ throw new Error(errorMessage);
179
+ }
180
+ const eventIds = response.map((eventResponse) => eventResponse.event.id).join(', ');
181
+ this.logger.info(`Successfully published batch of ${events.length} events with IDs [${eventIds}] to ${this.config.eventBusUrl}/events`);
182
+ }
183
+ catch (e) {
184
+ const errorMessage = `Failed to publish batch of ${events.length} events to event bus: ${e instanceof Error ? e.message : typeof e === 'string' ? e : JSON.stringify(e)}`;
185
+ this.logger.error(errorMessage, {
186
+ tenantId: this.config.tenantId,
187
+ eventCount: events.length,
188
+ detailTypes: events.map((ev) => ev.detailType),
189
+ eventBusEndpoint: this.safeEventBusEndpointForLog(),
190
+ });
191
+ throw new Error(errorMessage);
192
+ }
193
+ }
194
+ }
195
+ exports.EventBusService = EventBusService;
196
+ //# sourceMappingURL=EventBusService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventBusService.js","sourceRoot":"","sources":["../../src/events/EventBusService.ts"],"names":[],"mappings":";;;AAiDA,0DAA0D;AAC1D,MAAM,2BAA2B,GAAG,KAAM,CAAC;AAE3C;;;GAGG;AACH,MAAM,0BAA0B,GAAG,GAAG,GAAG,IAAI,CAAC;AAE9C,SAAS,SAAS,CAAC,KAAyB;IAC1C,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;AACpD,CAAC;AAED,SAAS,cAAc,CAAC,KAAa,EAAE,GAAW;IAChD,IAAI,KAAK,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;QACxB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,iBAAiB,KAAK,CAAC,MAAM,GAAG,GAAG,cAAc,CAAC;AACjF,CAAC;AAED,yFAAyF;AACzF,SAAS,iBAAiB,CAAC,IAAY;IACrC,IAAI,IAAI,CAAC,MAAM,IAAI,0BAA0B,EAAE,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,cAAc,CAAC,IAAI,EAAE,0BAA0B,CAAC,CAAC;AA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