@dereekb/analytics 13.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.
@@ -0,0 +1,641 @@
1
+ import { Injectable, Inject, Logger, Module, SetMetadata } from '@nestjs/common';
2
+ import { Analytics } from '@segment/analytics-node';
3
+ import { ConfigService, ConfigModule } from '@nestjs/config';
4
+ import { ServerEnvironmentService } from '@dereekb/nestjs';
5
+ import { tap } from 'rxjs/operators';
6
+
7
+ function _type_of(obj) {
8
+ "@swc/helpers - typeof";
9
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
10
+ }
11
+ function __decorate(decorators, target, key, desc) {
12
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
13
+ if ((typeof Reflect === "undefined" ? "undefined" : _type_of(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
15
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16
+ }
17
+ function __param(paramIndex, decorator) {
18
+ return function(target, key) {
19
+ decorator(target, key, paramIndex);
20
+ };
21
+ }
22
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
23
+ var e = new Error(message);
24
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
25
+ };
26
+
27
+ function _class_call_check$4(instance, Constructor) {
28
+ if (!(instance instanceof Constructor)) {
29
+ throw new TypeError("Cannot call a class as a function");
30
+ }
31
+ }
32
+ function _defineProperties$3(target, props) {
33
+ for(var i = 0; i < props.length; i++){
34
+ var descriptor = props[i];
35
+ descriptor.enumerable = descriptor.enumerable || false;
36
+ descriptor.configurable = true;
37
+ if ("value" in descriptor) descriptor.writable = true;
38
+ Object.defineProperty(target, descriptor.key, descriptor);
39
+ }
40
+ }
41
+ function _create_class$3(Constructor, protoProps, staticProps) {
42
+ if (staticProps) _defineProperties$3(Constructor, staticProps);
43
+ return Constructor;
44
+ }
45
+ function _define_property$3(obj, key, value) {
46
+ if (key in obj) {
47
+ Object.defineProperty(obj, key, {
48
+ value: value,
49
+ enumerable: true,
50
+ configurable: true,
51
+ writable: true
52
+ });
53
+ } else {
54
+ obj[key] = value;
55
+ }
56
+ return obj;
57
+ }
58
+ /**
59
+ * Configuration for the Segment analytics service.
60
+ */ var SegmentServiceConfig = /*#__PURE__*/ function() {
61
+ function SegmentServiceConfig() {
62
+ _class_call_check$4(this, SegmentServiceConfig);
63
+ /**
64
+ * Segment write key for the source.
65
+ */ _define_property$3(this, "writeKey", void 0);
66
+ /**
67
+ * When true, events are logged to the console instead of sent to Segment.
68
+ */ _define_property$3(this, "logOnly", void 0);
69
+ /**
70
+ * Optional application context included in all Segment event contexts.
71
+ */ _define_property$3(this, "appContext", void 0);
72
+ }
73
+ _create_class$3(SegmentServiceConfig, null, [
74
+ {
75
+ key: "assertValidConfig",
76
+ value: /**
77
+ * Validates that the given config has the required fields (e.g., a non-empty write key).
78
+ *
79
+ * @param config - The config instance to validate.
80
+ * @throws {Error} When the write key is missing or empty.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * SegmentServiceConfig.assertValidConfig(config);
85
+ * ```
86
+ */ function assertValidConfig(config) {
87
+ if (!config.writeKey) {
88
+ throw new Error('No Segment write key specified.');
89
+ }
90
+ }
91
+ }
92
+ ]);
93
+ return SegmentServiceConfig;
94
+ }
95
+ ();
96
+
97
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
98
+ try {
99
+ var info = gen[key](arg);
100
+ var value = info.value;
101
+ } catch (error) {
102
+ reject(error);
103
+ return;
104
+ }
105
+ if (info.done) {
106
+ resolve(value);
107
+ } else {
108
+ Promise.resolve(value).then(_next, _throw);
109
+ }
110
+ }
111
+ function _async_to_generator(fn) {
112
+ return function() {
113
+ var self = this, args = arguments;
114
+ return new Promise(function(resolve, reject) {
115
+ var gen = fn.apply(self, args);
116
+ function _next(value) {
117
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
118
+ }
119
+ function _throw(err) {
120
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
121
+ }
122
+ _next(undefined);
123
+ });
124
+ };
125
+ }
126
+ function _class_call_check$3(instance, Constructor) {
127
+ if (!(instance instanceof Constructor)) {
128
+ throw new TypeError("Cannot call a class as a function");
129
+ }
130
+ }
131
+ function _defineProperties$2(target, props) {
132
+ for(var i = 0; i < props.length; i++){
133
+ var descriptor = props[i];
134
+ descriptor.enumerable = descriptor.enumerable || false;
135
+ descriptor.configurable = true;
136
+ if ("value" in descriptor) descriptor.writable = true;
137
+ Object.defineProperty(target, descriptor.key, descriptor);
138
+ }
139
+ }
140
+ function _create_class$2(Constructor, protoProps, staticProps) {
141
+ if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
142
+ return Constructor;
143
+ }
144
+ function _define_property$2(obj, key, value) {
145
+ if (key in obj) {
146
+ Object.defineProperty(obj, key, {
147
+ value: value,
148
+ enumerable: true,
149
+ configurable: true,
150
+ writable: true
151
+ });
152
+ } else {
153
+ obj[key] = value;
154
+ }
155
+ return obj;
156
+ }
157
+ function _ts_generator(thisArg, body) {
158
+ var f, y, t, _ = {
159
+ label: 0,
160
+ sent: function() {
161
+ if (t[0] & 1) throw t[1];
162
+ return t[1];
163
+ },
164
+ trys: [],
165
+ ops: []
166
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
167
+ return d(g, "next", {
168
+ value: verb(0)
169
+ }), d(g, "throw", {
170
+ value: verb(1)
171
+ }), d(g, "return", {
172
+ value: verb(2)
173
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
174
+ value: function() {
175
+ return this;
176
+ }
177
+ }), g;
178
+ function verb(n) {
179
+ return function(v) {
180
+ return step([
181
+ n,
182
+ v
183
+ ]);
184
+ };
185
+ }
186
+ function step(op) {
187
+ if (f) throw new TypeError("Generator is already executing.");
188
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
189
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
190
+ if (y = 0, t) op = [
191
+ op[0] & 2,
192
+ t.value
193
+ ];
194
+ switch(op[0]){
195
+ case 0:
196
+ case 1:
197
+ t = op;
198
+ break;
199
+ case 4:
200
+ _.label++;
201
+ return {
202
+ value: op[1],
203
+ done: false
204
+ };
205
+ case 5:
206
+ _.label++;
207
+ y = op[1];
208
+ op = [
209
+ 0
210
+ ];
211
+ continue;
212
+ case 7:
213
+ op = _.ops.pop();
214
+ _.trys.pop();
215
+ continue;
216
+ default:
217
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
218
+ _ = 0;
219
+ continue;
220
+ }
221
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
222
+ _.label = op[1];
223
+ break;
224
+ }
225
+ if (op[0] === 6 && _.label < t[1]) {
226
+ _.label = t[1];
227
+ t = op;
228
+ break;
229
+ }
230
+ if (t && _.label < t[2]) {
231
+ _.label = t[2];
232
+ _.ops.push(op);
233
+ break;
234
+ }
235
+ if (t[2]) _.ops.pop();
236
+ _.trys.pop();
237
+ continue;
238
+ }
239
+ op = body.call(thisArg, _);
240
+ } catch (e) {
241
+ op = [
242
+ 6,
243
+ e
244
+ ];
245
+ y = 0;
246
+ } finally{
247
+ f = t = 0;
248
+ }
249
+ if (op[0] & 5) throw op[1];
250
+ return {
251
+ value: op[0] ? op[1] : void 0,
252
+ done: true
253
+ };
254
+ }
255
+ }
256
+ /**
257
+ * Injectable wrapper around the Segment Analytics Node SDK.
258
+ *
259
+ * Manages the Analytics client lifecycle, including flushing on module destroy.
260
+ */ var SegmentApi = /*#__PURE__*/ function() {
261
+ function SegmentApi(config) {
262
+ _class_call_check$3(this, SegmentApi);
263
+ _define_property$2(this, "config", void 0);
264
+ _define_property$2(this, "analytics", void 0);
265
+ this.config = config;
266
+ this.analytics = new Analytics({
267
+ writeKey: this.config.writeKey
268
+ });
269
+ }
270
+ _create_class$2(SegmentApi, [
271
+ {
272
+ key: "logOnly",
273
+ get: function get() {
274
+ return this.config.logOnly;
275
+ }
276
+ },
277
+ {
278
+ key: "onModuleDestroy",
279
+ value: function onModuleDestroy() {
280
+ return _async_to_generator(function() {
281
+ return _ts_generator(this, function(_state) {
282
+ switch(_state.label){
283
+ case 0:
284
+ return [
285
+ 4,
286
+ this.analytics.closeAndFlush()
287
+ ];
288
+ case 1:
289
+ _state.sent();
290
+ return [
291
+ 2
292
+ ];
293
+ }
294
+ });
295
+ }).call(this);
296
+ }
297
+ }
298
+ ]);
299
+ return SegmentApi;
300
+ }();
301
+ SegmentApi = __decorate([
302
+ Injectable(),
303
+ __param(0, Inject(SegmentServiceConfig))
304
+ ], SegmentApi);
305
+
306
+ function _class_call_check$2(instance, Constructor) {
307
+ if (!(instance instanceof Constructor)) {
308
+ throw new TypeError("Cannot call a class as a function");
309
+ }
310
+ }
311
+ function _defineProperties$1(target, props) {
312
+ for(var i = 0; i < props.length; i++){
313
+ var descriptor = props[i];
314
+ descriptor.enumerable = descriptor.enumerable || false;
315
+ descriptor.configurable = true;
316
+ if ("value" in descriptor) descriptor.writable = true;
317
+ Object.defineProperty(target, descriptor.key, descriptor);
318
+ }
319
+ }
320
+ function _create_class$1(Constructor, protoProps, staticProps) {
321
+ if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
322
+ return Constructor;
323
+ }
324
+ function _define_property$1(obj, key, value) {
325
+ if (key in obj) {
326
+ Object.defineProperty(obj, key, {
327
+ value: value,
328
+ enumerable: true,
329
+ configurable: true,
330
+ writable: true
331
+ });
332
+ } else {
333
+ obj[key] = value;
334
+ }
335
+ return obj;
336
+ }
337
+ function _object_spread(target) {
338
+ for(var i = 1; i < arguments.length; i++){
339
+ var source = arguments[i] != null ? arguments[i] : {};
340
+ var ownKeys = Object.keys(source);
341
+ if (typeof Object.getOwnPropertySymbols === "function") {
342
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
343
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
344
+ }));
345
+ }
346
+ ownKeys.forEach(function(key) {
347
+ _define_property$1(target, key, source[key]);
348
+ });
349
+ }
350
+ return target;
351
+ }
352
+ function ownKeys(object, enumerableOnly) {
353
+ var keys = Object.keys(object);
354
+ if (Object.getOwnPropertySymbols) {
355
+ var symbols = Object.getOwnPropertySymbols(object);
356
+ keys.push.apply(keys, symbols);
357
+ }
358
+ return keys;
359
+ }
360
+ function _object_spread_props(target, source) {
361
+ source = source != null ? source : {};
362
+ if (Object.getOwnPropertyDescriptors) {
363
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
364
+ } else {
365
+ ownKeys(Object(source)).forEach(function(key) {
366
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
367
+ });
368
+ }
369
+ return target;
370
+ }
371
+ /**
372
+ * High-level Segment analytics service.
373
+ *
374
+ * Handles track and identify calls, merging application context and
375
+ * supporting log-only mode for development/testing.
376
+ */ var SegmentService = /*#__PURE__*/ function() {
377
+ function SegmentService(segmentApi, config) {
378
+ _class_call_check$2(this, SegmentService);
379
+ _define_property$1(this, "segmentApi", void 0);
380
+ _define_property$1(this, "config", void 0);
381
+ _define_property$1(this, "logger", new Logger('SegmentService'));
382
+ this.segmentApi = segmentApi;
383
+ this.config = config;
384
+ }
385
+ _create_class$1(SegmentService, [
386
+ {
387
+ /**
388
+ * Tracks an event for a user. Requires a userId.
389
+ *
390
+ * In log-only mode, events are logged to the console instead of being sent to Segment.
391
+ *
392
+ * @param userId - the user to associate with the event
393
+ * @param event - the track event containing event name, properties, and optional context
394
+ *
395
+ * @throws {Error} When userId is falsy.
396
+ *
397
+ * @example
398
+ * ```ts
399
+ * segmentService.track('uid_123', {
400
+ * event: 'Item Purchased',
401
+ * properties: { itemId: 'sku_abc', price: 29.99 }
402
+ * });
403
+ * ```
404
+ */ key: "track",
405
+ value: function track(userId, event) {
406
+ if (!userId) {
407
+ throw new Error('No userId was provided to track().');
408
+ }
409
+ if (!this.config.logOnly) {
410
+ this.segmentApi.analytics.track({
411
+ userId: userId,
412
+ event: event.event,
413
+ properties: event.properties,
414
+ timestamp: event.timestamp,
415
+ context: _object_spread({}, event.context, this._appContext())
416
+ });
417
+ } else {
418
+ this.logger.debug("Segment (Log Only) - Track: ".concat(userId, " ").concat(event.event));
419
+ }
420
+ }
421
+ },
422
+ {
423
+ /**
424
+ * Tracks an event only if userId is provided. No-op if userId is nullish.
425
+ *
426
+ * Convenience wrapper around {@link track} for cases where the user may not be authenticated.
427
+ *
428
+ * @param userId - the user to associate with the event, or nullish to skip
429
+ * @param event - the track event containing event name, properties, and optional context
430
+ */ key: "tryTrack",
431
+ value: function tryTrack(userId, event) {
432
+ if (userId) {
433
+ this.track(userId, event);
434
+ }
435
+ }
436
+ },
437
+ {
438
+ /**
439
+ * Identifies a user with optional traits, syncing user properties to Segment.
440
+ *
441
+ * In log-only mode, the identify call is logged to the console instead of being sent.
442
+ *
443
+ * @param params - the identify parameters including userId and optional traits
444
+ *
445
+ * @example
446
+ * ```ts
447
+ * segmentService.identify({
448
+ * userId: 'uid_123',
449
+ * traits: { plan: 'premium', role: 'admin' }
450
+ * });
451
+ * ```
452
+ */ key: "identify",
453
+ value: function identify(params) {
454
+ if (!this.config.logOnly) {
455
+ this.segmentApi.analytics.identify(_object_spread_props(_object_spread({}, params), {
456
+ context: _object_spread({}, params.context, this._appContext())
457
+ }));
458
+ } else {
459
+ this.logger.debug("Segment (Log Only) - Identify: ".concat(params.userId));
460
+ }
461
+ }
462
+ },
463
+ {
464
+ key: "_appContext",
465
+ value: function _appContext() {
466
+ var appContext = this.config.appContext;
467
+ var result;
468
+ if (appContext) {
469
+ result = {
470
+ app: appContext
471
+ };
472
+ }
473
+ return result;
474
+ }
475
+ }
476
+ ]);
477
+ return SegmentService;
478
+ }();
479
+ SegmentService = __decorate([
480
+ Injectable(),
481
+ __param(0, Inject(SegmentApi)),
482
+ __param(1, Inject(SegmentServiceConfig))
483
+ ], SegmentService);
484
+
485
+ function _class_call_check$1(instance, Constructor) {
486
+ if (!(instance instanceof Constructor)) {
487
+ throw new TypeError("Cannot call a class as a function");
488
+ }
489
+ }
490
+ /**
491
+ * Factory that creates a SegmentServiceConfig from environment variables.
492
+ *
493
+ * When a {@link ServerEnvironmentService} is provided and the current environment is a
494
+ * testing environment, `logOnly` is forced to true regardless of the env variable.
495
+ *
496
+ * @param configService - NestJS ConfigService for reading environment variables.
497
+ * @param serverEnvironmentService - Service that identifies the current server environment.
498
+ * @returns A validated {@link SegmentServiceConfig} instance.
499
+ *
500
+ * @example
501
+ * ```ts
502
+ * const config = segmentServiceConfigFactory(configService, serverEnvironmentService);
503
+ * ```
504
+ */ function segmentServiceConfigFactory(configService, serverEnvironmentService) {
505
+ var isTestingEnv = serverEnvironmentService.isTestingEnv;
506
+ var logOnly = isTestingEnv || configService.get('SEGMENT_LOG_ONLY', 'false') === 'true';
507
+ var config = {
508
+ writeKey: configService.get('SEGMENT_WRITE_KEY', ''),
509
+ logOnly: logOnly
510
+ };
511
+ SegmentServiceConfig.assertValidConfig(config);
512
+ return config;
513
+ }
514
+ /**
515
+ * NestJS module that provides the {@link SegmentService} and its dependencies.
516
+ *
517
+ * Reads `SEGMENT_WRITE_KEY` and `SEGMENT_LOG_ONLY` from environment variables via {@link ConfigModule}.
518
+ * When a {@link ServerEnvironmentService} is available and the environment is a testing environment,
519
+ * `logOnly` is forced to `true`.
520
+ */ var SegmentServiceModule = function SegmentServiceModule() {
521
+ _class_call_check$1(this, SegmentServiceModule);
522
+ };
523
+ SegmentServiceModule = __decorate([
524
+ Module({
525
+ imports: [
526
+ ConfigModule
527
+ ],
528
+ providers: [
529
+ {
530
+ provide: SegmentServiceConfig,
531
+ inject: [
532
+ ConfigService,
533
+ ServerEnvironmentService
534
+ ],
535
+ useFactory: segmentServiceConfigFactory
536
+ },
537
+ SegmentApi,
538
+ SegmentService
539
+ ],
540
+ exports: [
541
+ SegmentService
542
+ ]
543
+ })
544
+ ], SegmentServiceModule);
545
+
546
+ function _class_call_check(instance, Constructor) {
547
+ if (!(instance instanceof Constructor)) {
548
+ throw new TypeError("Cannot call a class as a function");
549
+ }
550
+ }
551
+ function _defineProperties(target, props) {
552
+ for(var i = 0; i < props.length; i++){
553
+ var descriptor = props[i];
554
+ descriptor.enumerable = descriptor.enumerable || false;
555
+ descriptor.configurable = true;
556
+ if ("value" in descriptor) descriptor.writable = true;
557
+ Object.defineProperty(target, descriptor.key, descriptor);
558
+ }
559
+ }
560
+ function _create_class(Constructor, protoProps, staticProps) {
561
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
562
+ return Constructor;
563
+ }
564
+ function _define_property(obj, key, value) {
565
+ if (key in obj) {
566
+ Object.defineProperty(obj, key, {
567
+ value: value,
568
+ enumerable: true,
569
+ configurable: true,
570
+ writable: true
571
+ });
572
+ } else {
573
+ obj[key] = value;
574
+ }
575
+ return obj;
576
+ }
577
+ var ANALYTICS_INTERCEPTOR_METADATA_KEY = 'analyticsevent';
578
+ /**
579
+ * Decorator that marks a controller method for analytics event emission.
580
+ *
581
+ * Used in conjunction with {@link AnalyticsEventInterceptor} to emit events
582
+ * to NestJS EventEmitter2 after the handler completes.
583
+ *
584
+ * @param config - The analytics event configuration specifying the event name and optional data extractor.
585
+ * @returns A method decorator that attaches analytics metadata.
586
+ *
587
+ * @example
588
+ * ```ts
589
+ * @EmitAnalyticsEvent({ name: 'User Registered', fn: (result) => ({ userId: result.id }) })
590
+ * @Post('register')
591
+ * async register(@Body() body: RegisterDto) {
592
+ * return this.authService.register(body);
593
+ * }
594
+ * ```
595
+ */ var EmitAnalyticsEvent = function EmitAnalyticsEvent(config) {
596
+ if (!config.name) {
597
+ throw new Error('Analytics event name was not set properly.');
598
+ }
599
+ return SetMetadata(ANALYTICS_INTERCEPTOR_METADATA_KEY, config);
600
+ };
601
+ /**
602
+ * NestJS interceptor that emits analytics events via EventEmitter2
603
+ * for controller methods decorated with {@link EmitAnalyticsEvent}.
604
+ */ var AnalyticsEventInterceptor = /*#__PURE__*/ function() {
605
+ function AnalyticsEventInterceptor(reflector, eventEmitter) {
606
+ _class_call_check(this, AnalyticsEventInterceptor);
607
+ _define_property(this, "reflector", void 0);
608
+ _define_property(this, "eventEmitter", void 0);
609
+ this.reflector = reflector;
610
+ this.eventEmitter = eventEmitter;
611
+ }
612
+ _create_class(AnalyticsEventInterceptor, [
613
+ {
614
+ /**
615
+ * Intercepts the request pipeline, emitting an analytics event after the handler completes
616
+ * if the method is decorated with {@link EmitAnalyticsEvent}.
617
+ *
618
+ * @param context - The NestJS execution context.
619
+ * @param next - The next handler in the pipeline.
620
+ * @returns An observable that emits the handler result after triggering the analytics event.
621
+ */ key: "intercept",
622
+ value: function intercept(context, next) {
623
+ var _this = this;
624
+ var handler = context.getHandler();
625
+ var config = this.reflector.get(ANALYTICS_INTERCEPTOR_METADATA_KEY, handler);
626
+ return next.handle().pipe(tap(function(result) {
627
+ var eventValues = config.fn ? config.fn(result, context) : undefined;
628
+ if (eventValues != undefined) {
629
+ _this.eventEmitter.emit(config.name, eventValues);
630
+ }
631
+ }));
632
+ }
633
+ }
634
+ ]);
635
+ return AnalyticsEventInterceptor;
636
+ }();
637
+ AnalyticsEventInterceptor = __decorate([
638
+ Injectable()
639
+ ], AnalyticsEventInterceptor);
640
+
641
+ export { ANALYTICS_INTERCEPTOR_METADATA_KEY, AnalyticsEventInterceptor, EmitAnalyticsEvent, SegmentApi, SegmentService, SegmentServiceConfig, SegmentServiceModule, segmentServiceConfigFactory };
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@dereekb/analytics/nestjs",
3
+ "version": "13.4.0",
4
+ "peerDependencies": {
5
+ "@dereekb/analytics": "13.4.0",
6
+ "@dereekb/nestjs": "13.4.0",
7
+ "@dereekb/util": "13.4.0",
8
+ "@nestjs/common": "^11.1.16",
9
+ "@nestjs/config": "^4.0.3",
10
+ "@nestjs/core": "^11.1.16",
11
+ "@nestjs/event-emitter": "^3.0.1",
12
+ "@segment/analytics-node": "^2.3.0",
13
+ "rxjs": "^7.8.0"
14
+ },
15
+ "devDependencies": {
16
+ "@nestjs/testing": "^11.1.14"
17
+ },
18
+ "exports": {
19
+ "./package.json": "./package.json",
20
+ ".": {
21
+ "module": "./index.esm.js",
22
+ "types": "./index.d.ts",
23
+ "import": "./index.cjs.mjs",
24
+ "default": "./index.cjs.js"
25
+ }
26
+ },
27
+ "module": "./index.esm.js",
28
+ "main": "./index.cjs.js",
29
+ "types": "./index.d.ts"
30
+ }
@@ -0,0 +1 @@
1
+ export * from './lib';
@@ -0,0 +1,2 @@
1
+ export * from './segment';
2
+ export * from './interceptor';