@dereekb/firebase-server 13.10.2 → 13.10.4

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/index.cjs.js CHANGED
@@ -6059,7 +6059,7 @@ function _ts_generator$b(thisArg, body) {
6059
6059
  * @returns Paginated query result with cursor for the next page.
6060
6060
  */ function executeOnCallQuery(config) {
6061
6061
  return _async_to_generator$b(function() {
6062
- var _collection, _params_limit, params, collection, loadCursorDocument, buildConstraints, _config_maxLimit, maxLimit, mapResult, requestedLimit, effectiveLimit, constraints, cursorSnapshot, e, errorInfo, executableQuery, querySnapshot, docs, hasMore, resultDocs, results, keys, cursorDocumentKey;
6062
+ var _collection, _params_limit, _resultDocs_at, params, collection, loadCursorDocument, buildConstraints, _config_maxLimit, maxLimit, mapResult, requestedLimit, effectiveLimit, constraints, cursorSnapshot, e, errorInfo, executableQuery, querySnapshot, docs, hasMore, resultDocs, results, keys, cursorDocumentKey;
6063
6063
  return _ts_generator$b(this, function(_state) {
6064
6064
  switch(_state.label){
6065
6065
  case 0:
@@ -6130,7 +6130,7 @@ function _ts_generator$b(thisArg, body) {
6130
6130
  keys = resultDocs.map(function(doc) {
6131
6131
  return doc.ref.path;
6132
6132
  });
6133
- cursorDocumentKey = resultDocs.length > 0 ? resultDocs.at(-1).ref.path : undefined;
6133
+ cursorDocumentKey = (_resultDocs_at = resultDocs.at(-1)) === null || _resultDocs_at === void 0 ? void 0 : _resultDocs_at.ref.path;
6134
6134
  return [
6135
6135
  2,
6136
6136
  {
package/index.esm.js CHANGED
@@ -6057,7 +6057,7 @@ function _ts_generator$b(thisArg, body) {
6057
6057
  * @returns Paginated query result with cursor for the next page.
6058
6058
  */ function executeOnCallQuery(config) {
6059
6059
  return _async_to_generator$b(function() {
6060
- var _collection, _params_limit, params, collection, loadCursorDocument, buildConstraints, _config_maxLimit, maxLimit, mapResult, requestedLimit, effectiveLimit, constraints, cursorSnapshot, e, errorInfo, executableQuery, querySnapshot, docs, hasMore, resultDocs, results, keys, cursorDocumentKey;
6060
+ var _collection, _params_limit, _resultDocs_at, params, collection, loadCursorDocument, buildConstraints, _config_maxLimit, maxLimit, mapResult, requestedLimit, effectiveLimit, constraints, cursorSnapshot, e, errorInfo, executableQuery, querySnapshot, docs, hasMore, resultDocs, results, keys, cursorDocumentKey;
6061
6061
  return _ts_generator$b(this, function(_state) {
6062
6062
  switch(_state.label){
6063
6063
  case 0:
@@ -6128,7 +6128,7 @@ function _ts_generator$b(thisArg, body) {
6128
6128
  keys = resultDocs.map(function(doc) {
6129
6129
  return doc.ref.path;
6130
6130
  });
6131
- cursorDocumentKey = resultDocs.length > 0 ? resultDocs.at(-1).ref.path : undefined;
6131
+ cursorDocumentKey = (_resultDocs_at = resultDocs.at(-1)) === null || _resultDocs_at === void 0 ? void 0 : _resultDocs_at.ref.path;
6132
6132
  return [
6133
6133
  2,
6134
6134
  {
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/mailgun",
3
- "version": "13.10.2",
3
+ "version": "13.10.4",
4
4
  "peerDependencies": {
5
- "@dereekb/analytics": "13.10.2",
6
- "@dereekb/firebase": "13.10.2",
7
- "@dereekb/firebase-server": "13.10.2",
8
- "@dereekb/date": "13.10.2",
9
- "@dereekb/nestjs": "13.10.2",
10
- "@dereekb/model": "13.10.2",
11
- "@dereekb/rxjs": "13.10.2",
12
- "@dereekb/util": "13.10.2"
5
+ "@dereekb/analytics": "13.10.4",
6
+ "@dereekb/firebase": "13.10.4",
7
+ "@dereekb/firebase-server": "13.10.4",
8
+ "@dereekb/date": "13.10.4",
9
+ "@dereekb/nestjs": "13.10.4",
10
+ "@dereekb/model": "13.10.4",
11
+ "@dereekb/rxjs": "13.10.4",
12
+ "@dereekb/util": "13.10.4"
13
13
  },
14
14
  "exports": {
15
15
  "./package.json": "./package.json",
@@ -3059,6 +3059,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = dateFns.hoursToMilliseconds(NOTIFI
3059
3059
  case 2:
3060
3060
  _ref = _state.sent(), emailRecipients = _ref.emails, textRecipients = _ref.texts, notificationSummaryRecipients = _ref.notificationSummaries;
3061
3061
  es = notification.es, ts = notification.ts, ns = notification.ns;
3062
+ ps = undefined; // next ps value. If undefined, remains the same.
3062
3063
  currentEsr = notification.esr, currentTsr = notification.tsr;
3063
3064
  if (!(es === firebase.NotificationSendState.QUEUED || es === firebase.NotificationSendState.SENT_PARTIAL)) return [
3064
3065
  3,
@@ -3057,6 +3057,7 @@ var NOTIFICATION_TASK_TYPE_FAILURE_DELAY_MS = hoursToMilliseconds(NOTIFICATION_T
3057
3057
  case 2:
3058
3058
  _ref = _state.sent(), emailRecipients = _ref.emails, textRecipients = _ref.texts, notificationSummaryRecipients = _ref.notificationSummaries;
3059
3059
  es = notification.es, ts = notification.ts, ns = notification.ns;
3060
+ ps = undefined; // next ps value. If undefined, remains the same.
3060
3061
  currentEsr = notification.esr, currentTsr = notification.tsr;
3061
3062
  if (!(es === NotificationSendState.QUEUED || es === NotificationSendState.SENT_PARTIAL)) return [
3062
3063
  3,
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/model",
3
- "version": "13.10.2",
3
+ "version": "13.10.4",
4
4
  "peerDependencies": {
5
- "@dereekb/analytics": "13.10.2",
6
- "@dereekb/date": "13.10.2",
7
- "@dereekb/firebase": "13.10.2",
8
- "@dereekb/firebase-server": "13.10.2",
9
- "@dereekb/model": "13.10.2",
10
- "@dereekb/nestjs": "13.10.2",
11
- "@dereekb/rxjs": "13.10.2",
12
- "@dereekb/util": "13.10.2",
5
+ "@dereekb/analytics": "13.10.4",
6
+ "@dereekb/date": "13.10.4",
7
+ "@dereekb/firebase": "13.10.4",
8
+ "@dereekb/firebase-server": "13.10.4",
9
+ "@dereekb/model": "13.10.4",
10
+ "@dereekb/nestjs": "13.10.4",
11
+ "@dereekb/rxjs": "13.10.4",
12
+ "@dereekb/util": "13.10.4",
13
13
  "@nestjs/common": "^11.1.19",
14
14
  "@nestjs/config": "^4.0.4",
15
15
  "archiver": "^7.0.1",
package/oidc/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/oidc",
3
- "version": "13.10.2",
3
+ "version": "13.10.4",
4
4
  "peerDependencies": {
5
- "@dereekb/analytics": "13.10.2",
6
- "@dereekb/date": "13.10.2",
7
- "@dereekb/firebase": "13.10.2",
8
- "@dereekb/firebase-server": "13.10.2",
9
- "@dereekb/model": "13.10.2",
10
- "@dereekb/nestjs": "13.10.2",
11
- "@dereekb/rxjs": "13.10.2",
12
- "@dereekb/util": "13.10.2",
13
- "@dereekb/zoho": "13.10.2",
5
+ "@dereekb/analytics": "13.10.4",
6
+ "@dereekb/date": "13.10.4",
7
+ "@dereekb/firebase": "13.10.4",
8
+ "@dereekb/firebase-server": "13.10.4",
9
+ "@dereekb/model": "13.10.4",
10
+ "@dereekb/nestjs": "13.10.4",
11
+ "@dereekb/rxjs": "13.10.4",
12
+ "@dereekb/util": "13.10.4",
13
+ "@dereekb/zoho": "13.10.4",
14
14
  "@nestjs/common": "^11.1.19",
15
15
  "@nestjs/config": "^4.0.4",
16
16
  "express": "^5.2.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server",
3
- "version": "13.10.2",
3
+ "version": "13.10.4",
4
4
  "exports": {
5
5
  "./test": {
6
6
  "module": "./test/index.esm.js",
@@ -43,15 +43,15 @@
43
43
  "main": "./index.cjs.js",
44
44
  "types": "./src/index.d.ts",
45
45
  "peerDependencies": {
46
- "@dereekb/analytics": "13.10.2",
47
- "@dereekb/date": "13.10.2",
48
- "@dereekb/dbx-core": "13.10.2",
49
- "@dereekb/firebase": "13.10.2",
50
- "@dereekb/model": "13.10.2",
51
- "@dereekb/nestjs": "13.10.2",
52
- "@dereekb/rxjs": "13.10.2",
53
- "@dereekb/util": "13.10.2",
54
- "@dereekb/zoho": "13.10.2",
46
+ "@dereekb/analytics": "13.10.4",
47
+ "@dereekb/date": "13.10.4",
48
+ "@dereekb/dbx-core": "13.10.4",
49
+ "@dereekb/firebase": "13.10.4",
50
+ "@dereekb/model": "13.10.4",
51
+ "@dereekb/nestjs": "13.10.4",
52
+ "@dereekb/rxjs": "13.10.4",
53
+ "@dereekb/util": "13.10.4",
54
+ "@dereekb/zoho": "13.10.4",
55
55
  "@google-cloud/firestore": "^7.11.6",
56
56
  "@google-cloud/storage": "^7.19.0",
57
57
  "@nestjs/common": "^11.1.19",
package/test/index.cjs.js CHANGED
@@ -553,12 +553,7 @@ function _ts_generator$a(thisArg, body) {
553
553
  ];
554
554
  case 2:
555
555
  inputUser = _state.sent();
556
- return [
557
- 4,
558
- templateGetter()
559
- ];
560
- case 3:
561
- inputTemplate = _state.sent();
556
+ inputTemplate = templateGetter();
562
557
  uid = (inputUser === null || inputUser === void 0 ? void 0 : inputUser.uid) || makeUid();
563
558
  _$_object_spread = _object_spread$5({}, makeUserDetails(uid, params), inputTemplate), details = _$_object_spread.details, claims = _$_object_spread.claims, userDetailsAddContactInfo = _$_object_spread.addContactInfo;
564
559
  _ref = details !== null && details !== void 0 ? details : {}, detailsPhoneNumber = _ref.phoneNumber, detailsEmail = _ref.email; // keep details if provided
@@ -581,38 +576,38 @@ function _ts_generator$a(thisArg, body) {
581
576
  phoneNumber: phoneNumber
582
577
  }), inputUser))
583
578
  ];
584
- case 4:
579
+ case 3:
585
580
  userRecord = _state.sent();
586
581
  if (!claims) return [
587
582
  3,
588
- 6
583
+ 5
589
584
  ];
590
585
  return [
591
586
  4,
592
587
  auth.setCustomUserClaims(uid, claims)
593
588
  ];
594
- case 5:
589
+ case 4:
595
590
  _state.sent();
596
- _state.label = 6;
597
- case 6:
591
+ _state.label = 5;
592
+ case 5:
598
593
  return [
599
594
  4,
600
595
  makeInstance(uid, f.instance, params, userRecord)
601
596
  ];
602
- case 7:
597
+ case 6:
603
598
  instance = _state.sent();
604
599
  if (!initUser) return [
605
600
  3,
606
- 9
601
+ 8
607
602
  ];
608
603
  return [
609
604
  4,
610
605
  initUser(instance, params)
611
606
  ];
612
- case 8:
607
+ case 7:
613
608
  _state.sent();
614
- _state.label = 9;
615
- case 9:
609
+ _state.label = 8;
610
+ case 8:
616
611
  return [
617
612
  2,
618
613
  instance
@@ -790,8 +785,7 @@ function _ts_generator$a(thisArg, body) {
790
785
  }
791
786
  };
792
787
  var customClaims = userRecord.customClaims;
793
- var claims = _object_spread$5({}, customClaims, baseClaims);
794
- return claims;
788
+ return _object_spread$5({}, customClaims, baseClaims);
795
789
  }
796
790
 
797
791
  function _assert_this_initialized$8(self) {
@@ -1239,8 +1233,7 @@ var adminEnvironmentInitialized = false;
1239
1233
  * // => 'firebase-test-1710000000000'
1240
1234
  * ```
1241
1235
  */ function generateNewProjectId() {
1242
- var projectId = 'firebase-test-' + new Date().getTime();
1243
- return projectId;
1236
+ return 'firebase-test-' + new Date().getTime();
1244
1237
  }
1245
1238
  /**
1246
1239
  * Generates a new project ID and writes it to the `GCLOUD_PROJECT` and `GCLOUD_TEST_PROJECT`
@@ -1583,7 +1576,7 @@ var COUNTER$1 = 0;
1583
1576
  });
1584
1577
  })();
1585
1578
  },
1586
- teardownInstance: function teardownInstance(instance, config) {
1579
+ teardownInstance: function teardownInstance(instance, _config) {
1587
1580
  return _async_to_generator$8(function() {
1588
1581
  return _ts_generator$8(this, function(_state) {
1589
1582
  switch(_state.label){
@@ -1875,7 +1868,7 @@ var COUNTER = 0;
1875
1868
  });
1876
1869
  })();
1877
1870
  },
1878
- teardownInstance: function teardownInstance(instance, config) {
1871
+ teardownInstance: function teardownInstance(_instance, _config) {
1879
1872
  return _async_to_generator$7(function() {
1880
1873
  return _ts_generator$7(this, function(_state) {
1881
1874
  return [
@@ -2350,7 +2343,7 @@ function _ts_generator$6(thisArg, body) {
2350
2343
  buildFixture: function buildFixture() {
2351
2344
  return new FirebaseAdminTestContextFixture();
2352
2345
  },
2353
- setupInstance: function setupInstance(config) {
2346
+ setupInstance: function setupInstance(_config) {
2354
2347
  return _async_to_generator$6(function() {
2355
2348
  var projectId, storageBucket, app;
2356
2349
  return _ts_generator$6(this, function(_state) {
@@ -2370,7 +2363,7 @@ function _ts_generator$6(thisArg, body) {
2370
2363
  });
2371
2364
  })();
2372
2365
  },
2373
- teardownInstance: function teardownInstance(instance, config) {
2366
+ teardownInstance: function teardownInstance(instance, _config) {
2374
2367
  return _async_to_generator$6(function() {
2375
2368
  return _ts_generator$6(this, function(_state) {
2376
2369
  switch(_state.label){
@@ -2640,7 +2633,7 @@ function _ts_generator$5(thisArg, body) {
2640
2633
  // context is marked optional here to better match the gen 1 callable function signature
2641
2634
  return function(data, context) {
2642
2635
  return _async_to_generator$5(function() {
2643
- var _ref, request, result;
2636
+ var _ref, request;
2644
2637
  return _ts_generator$5(this, function(_state) {
2645
2638
  switch(_state.label){
2646
2639
  case 0:
@@ -2655,10 +2648,9 @@ function _ts_generator$5(thisArg, body) {
2655
2648
  wrappedCloudFunction(request)
2656
2649
  ];
2657
2650
  case 1:
2658
- result = _state.sent();
2659
2651
  return [
2660
2652
  2,
2661
- result
2653
+ _state.sent()
2662
2654
  ];
2663
2655
  }
2664
2656
  });
@@ -3803,7 +3795,9 @@ function _ts_generator$3(thisArg, body) {
3803
3795
  // Nest was compiled but instance creation/init failed — close the compiled module to prevent resource leaks
3804
3796
  return [
3805
3797
  4,
3806
- nest.close().catch(function() {})
3798
+ nest.close().catch(function() {
3799
+ return undefined;
3800
+ })
3807
3801
  ];
3808
3802
  case 6:
3809
3803
  _state.sent();
@@ -4121,21 +4115,20 @@ function _is_native_reflect_construct$2() {
4121
4115
  * Suffix appended to each key in a {@link CallableRequestTestConfigMapObject} when building
4122
4116
  * the {@link CallableRequestTestMultipleFixture}. For example, a key `"createUser"` produces
4123
4117
  * a fixture property named `"createUserWrappedFn"`.
4124
- */ var CallableRequestTestMultipleFixtureSuffix = 'WrappedFn';
4118
+ */ // eslint-disable-next-line @typescript-eslint/naming-convention -- PascalCase chosen so the const reads as a type-level token in template literal types
4119
+ var CallableRequestTestMultipleFixtureSuffix = 'WrappedFn';
4125
4120
  /**
4126
4121
  * Type guard that distinguishes a {@link CallableRequestTestSingleConfig} from a
4127
4122
  * {@link CallableRequestTestMultipleConfig} by checking for the presence of the `fn` property.
4128
4123
  */ function isCallableRequestTestSingleConfig(config) {
4129
- var isSingle = Boolean(config.fn);
4130
- return isSingle;
4124
+ return Boolean(config.fn);
4131
4125
  }
4132
4126
  function callableRequestTest(config, buildTests) {
4133
4127
  if (isCallableRequestTestSingleConfig(config)) {
4134
4128
  var f = config.f, fn = config.fn;
4135
4129
  test.useTestFunctionFixture({
4136
4130
  fn: function fn1() {
4137
- var x = wrapCallableRequestForNestTestsGetter(f, fn)();
4138
- return x;
4131
+ return wrapCallableRequestForNestTestsGetter(f, fn)();
4139
4132
  }
4140
4133
  }, buildTests);
4141
4134
  } else {
@@ -4164,16 +4157,14 @@ function describeCallableRequestTest(label, config, buildTests) {
4164
4157
  * Type guard that distinguishes a {@link CloudFunctionTestSingleConfig} from a
4165
4158
  * {@link CloudFunctionTestMultipleConfig} by checking for the presence of the `fn` property.
4166
4159
  */ function isCloudFunctionTestSingleConfig(config) {
4167
- var isSingle = Boolean(config.fn);
4168
- return isSingle;
4160
+ return Boolean(config.fn);
4169
4161
  }
4170
4162
  function cloudFunctionTest(config, buildTests) {
4171
4163
  if (isCloudFunctionTestSingleConfig(config)) {
4172
4164
  var f = config.f, fn = config.fn;
4173
4165
  test.useTestFunctionFixture({
4174
4166
  fn: function fn1() {
4175
- var x = wrapCloudFunctionForNestTestsGetter(f, fn)();
4176
- return x;
4167
+ return wrapCloudFunctionForNestTestsGetter(f, fn)();
4177
4168
  }
4178
4169
  }, buildTests);
4179
4170
  } else {
package/test/index.esm.js CHANGED
@@ -552,12 +552,7 @@ function _ts_generator$a(thisArg, body) {
552
552
  ];
553
553
  case 2:
554
554
  inputUser = _state.sent();
555
- return [
556
- 4,
557
- templateGetter()
558
- ];
559
- case 3:
560
- inputTemplate = _state.sent();
555
+ inputTemplate = templateGetter();
561
556
  uid = (inputUser === null || inputUser === void 0 ? void 0 : inputUser.uid) || makeUid();
562
557
  _$_object_spread = _object_spread$5({}, makeUserDetails(uid, params), inputTemplate), details = _$_object_spread.details, claims = _$_object_spread.claims, userDetailsAddContactInfo = _$_object_spread.addContactInfo;
563
558
  _ref = details !== null && details !== void 0 ? details : {}, detailsPhoneNumber = _ref.phoneNumber, detailsEmail = _ref.email; // keep details if provided
@@ -580,38 +575,38 @@ function _ts_generator$a(thisArg, body) {
580
575
  phoneNumber: phoneNumber
581
576
  }), inputUser))
582
577
  ];
583
- case 4:
578
+ case 3:
584
579
  userRecord = _state.sent();
585
580
  if (!claims) return [
586
581
  3,
587
- 6
582
+ 5
588
583
  ];
589
584
  return [
590
585
  4,
591
586
  auth.setCustomUserClaims(uid, claims)
592
587
  ];
593
- case 5:
588
+ case 4:
594
589
  _state.sent();
595
- _state.label = 6;
596
- case 6:
590
+ _state.label = 5;
591
+ case 5:
597
592
  return [
598
593
  4,
599
594
  makeInstance(uid, f.instance, params, userRecord)
600
595
  ];
601
- case 7:
596
+ case 6:
602
597
  instance = _state.sent();
603
598
  if (!initUser) return [
604
599
  3,
605
- 9
600
+ 8
606
601
  ];
607
602
  return [
608
603
  4,
609
604
  initUser(instance, params)
610
605
  ];
611
- case 8:
606
+ case 7:
612
607
  _state.sent();
613
- _state.label = 9;
614
- case 9:
608
+ _state.label = 8;
609
+ case 8:
615
610
  return [
616
611
  2,
617
612
  instance
@@ -789,8 +784,7 @@ function _ts_generator$a(thisArg, body) {
789
784
  }
790
785
  };
791
786
  var customClaims = userRecord.customClaims;
792
- var claims = _object_spread$5({}, customClaims, baseClaims);
793
- return claims;
787
+ return _object_spread$5({}, customClaims, baseClaims);
794
788
  }
795
789
 
796
790
  function _assert_this_initialized$8(self) {
@@ -1238,8 +1232,7 @@ var adminEnvironmentInitialized = false;
1238
1232
  * // => 'firebase-test-1710000000000'
1239
1233
  * ```
1240
1234
  */ function generateNewProjectId() {
1241
- var projectId = 'firebase-test-' + new Date().getTime();
1242
- return projectId;
1235
+ return 'firebase-test-' + new Date().getTime();
1243
1236
  }
1244
1237
  /**
1245
1238
  * Generates a new project ID and writes it to the `GCLOUD_PROJECT` and `GCLOUD_TEST_PROJECT`
@@ -1582,7 +1575,7 @@ var COUNTER$1 = 0;
1582
1575
  });
1583
1576
  })();
1584
1577
  },
1585
- teardownInstance: function teardownInstance(instance, config) {
1578
+ teardownInstance: function teardownInstance(instance, _config) {
1586
1579
  return _async_to_generator$8(function() {
1587
1580
  return _ts_generator$8(this, function(_state) {
1588
1581
  switch(_state.label){
@@ -1874,7 +1867,7 @@ var COUNTER = 0;
1874
1867
  });
1875
1868
  })();
1876
1869
  },
1877
- teardownInstance: function teardownInstance(instance, config) {
1870
+ teardownInstance: function teardownInstance(_instance, _config) {
1878
1871
  return _async_to_generator$7(function() {
1879
1872
  return _ts_generator$7(this, function(_state) {
1880
1873
  return [
@@ -2349,7 +2342,7 @@ function _ts_generator$6(thisArg, body) {
2349
2342
  buildFixture: function buildFixture() {
2350
2343
  return new FirebaseAdminTestContextFixture();
2351
2344
  },
2352
- setupInstance: function setupInstance(config) {
2345
+ setupInstance: function setupInstance(_config) {
2353
2346
  return _async_to_generator$6(function() {
2354
2347
  var projectId, storageBucket, app;
2355
2348
  return _ts_generator$6(this, function(_state) {
@@ -2369,7 +2362,7 @@ function _ts_generator$6(thisArg, body) {
2369
2362
  });
2370
2363
  })();
2371
2364
  },
2372
- teardownInstance: function teardownInstance(instance, config) {
2365
+ teardownInstance: function teardownInstance(instance, _config) {
2373
2366
  return _async_to_generator$6(function() {
2374
2367
  return _ts_generator$6(this, function(_state) {
2375
2368
  switch(_state.label){
@@ -2639,7 +2632,7 @@ function _ts_generator$5(thisArg, body) {
2639
2632
  // context is marked optional here to better match the gen 1 callable function signature
2640
2633
  return function(data, context) {
2641
2634
  return _async_to_generator$5(function() {
2642
- var _ref, request, result;
2635
+ var _ref, request;
2643
2636
  return _ts_generator$5(this, function(_state) {
2644
2637
  switch(_state.label){
2645
2638
  case 0:
@@ -2654,10 +2647,9 @@ function _ts_generator$5(thisArg, body) {
2654
2647
  wrappedCloudFunction(request)
2655
2648
  ];
2656
2649
  case 1:
2657
- result = _state.sent();
2658
2650
  return [
2659
2651
  2,
2660
- result
2652
+ _state.sent()
2661
2653
  ];
2662
2654
  }
2663
2655
  });
@@ -3802,7 +3794,9 @@ function _ts_generator$3(thisArg, body) {
3802
3794
  // Nest was compiled but instance creation/init failed — close the compiled module to prevent resource leaks
3803
3795
  return [
3804
3796
  4,
3805
- nest.close().catch(function() {})
3797
+ nest.close().catch(function() {
3798
+ return undefined;
3799
+ })
3806
3800
  ];
3807
3801
  case 6:
3808
3802
  _state.sent();
@@ -4120,21 +4114,20 @@ function _is_native_reflect_construct$2() {
4120
4114
  * Suffix appended to each key in a {@link CallableRequestTestConfigMapObject} when building
4121
4115
  * the {@link CallableRequestTestMultipleFixture}. For example, a key `"createUser"` produces
4122
4116
  * a fixture property named `"createUserWrappedFn"`.
4123
- */ var CallableRequestTestMultipleFixtureSuffix = 'WrappedFn';
4117
+ */ // eslint-disable-next-line @typescript-eslint/naming-convention -- PascalCase chosen so the const reads as a type-level token in template literal types
4118
+ var CallableRequestTestMultipleFixtureSuffix = 'WrappedFn';
4124
4119
  /**
4125
4120
  * Type guard that distinguishes a {@link CallableRequestTestSingleConfig} from a
4126
4121
  * {@link CallableRequestTestMultipleConfig} by checking for the presence of the `fn` property.
4127
4122
  */ function isCallableRequestTestSingleConfig(config) {
4128
- var isSingle = Boolean(config.fn);
4129
- return isSingle;
4123
+ return Boolean(config.fn);
4130
4124
  }
4131
4125
  function callableRequestTest(config, buildTests) {
4132
4126
  if (isCallableRequestTestSingleConfig(config)) {
4133
4127
  var f = config.f, fn = config.fn;
4134
4128
  useTestFunctionFixture({
4135
4129
  fn: function fn1() {
4136
- var x = wrapCallableRequestForNestTestsGetter(f, fn)();
4137
- return x;
4130
+ return wrapCallableRequestForNestTestsGetter(f, fn)();
4138
4131
  }
4139
4132
  }, buildTests);
4140
4133
  } else {
@@ -4163,16 +4156,14 @@ function describeCallableRequestTest(label, config, buildTests) {
4163
4156
  * Type guard that distinguishes a {@link CloudFunctionTestSingleConfig} from a
4164
4157
  * {@link CloudFunctionTestMultipleConfig} by checking for the presence of the `fn` property.
4165
4158
  */ function isCloudFunctionTestSingleConfig(config) {
4166
- var isSingle = Boolean(config.fn);
4167
- return isSingle;
4159
+ return Boolean(config.fn);
4168
4160
  }
4169
4161
  function cloudFunctionTest(config, buildTests) {
4170
4162
  if (isCloudFunctionTestSingleConfig(config)) {
4171
4163
  var f = config.f, fn = config.fn;
4172
4164
  useTestFunctionFixture({
4173
4165
  fn: function fn1() {
4174
- var x = wrapCloudFunctionForNestTestsGetter(f, fn)();
4175
- return x;
4166
+ return wrapCloudFunctionForNestTestsGetter(f, fn)();
4176
4167
  }
4177
4168
  }, buildTests);
4178
4169
  } else {
package/test/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/test",
3
- "version": "13.10.2",
3
+ "version": "13.10.4",
4
4
  "peerDependencies": {
5
- "@dereekb/analytics": "13.10.2",
6
- "@dereekb/date": "13.10.2",
7
- "@dereekb/firebase": "13.10.2",
8
- "@dereekb/firebase-server": "13.10.2",
9
- "@dereekb/firebase-server/oidc": "13.10.2",
10
- "@dereekb/model": "13.10.2",
11
- "@dereekb/nestjs": "13.10.2",
12
- "@dereekb/rxjs": "13.10.2",
13
- "@dereekb/util": "13.10.2",
5
+ "@dereekb/analytics": "13.10.4",
6
+ "@dereekb/date": "13.10.4",
7
+ "@dereekb/firebase": "13.10.4",
8
+ "@dereekb/firebase-server": "13.10.4",
9
+ "@dereekb/firebase-server/oidc": "13.10.4",
10
+ "@dereekb/model": "13.10.4",
11
+ "@dereekb/nestjs": "13.10.4",
12
+ "@dereekb/rxjs": "13.10.4",
13
+ "@dereekb/util": "13.10.4",
14
14
  "@google-cloud/firestore": "^7.11.6",
15
15
  "@google-cloud/storage": "^7.19.0",
16
16
  "@nestjs/common": "^11.1.19",
@@ -23,7 +23,7 @@
23
23
  "supertest": "^7.2.2"
24
24
  },
25
25
  "devDependencies": {
26
- "@dereekb/nestjs": "13.10.2"
26
+ "@dereekb/nestjs": "13.10.4"
27
27
  },
28
28
  "exports": {
29
29
  "./package.json": "./package.json",
@@ -44,6 +44,7 @@ export interface AuthorizedUserTestContext {
44
44
  callWrappedFunction<F extends WrappedCallableRequest<any, any>>(fn: F, params: WrappedCallableRequestParams<F>, skipJsonConversion?: boolean): Promise<WrappedCallableRequestOutput<F>>;
45
45
  /**
46
46
  * Used for calling any non-callable gen 2 function (e.g. scheduled functions, cloud functions, blocking functions) or any gen 1 function.
47
+ *
47
48
  * @param fn
48
49
  * @param params
49
50
  * @param skipJsonConversion
@@ -1,10 +1,10 @@
1
1
  import { AbstractChildTestContextFixture, type BuildTestsWithContextFunction, type TestContextFactory, type TestContextFixture } from '@dereekb/util/test';
2
2
  import { AbstractFirebaseAdminTestContextInstanceChild, type FirebaseAdminTestContextInstance } from './firebase.admin';
3
- import { INestApplication, type Abstract, type INestApplicationContext, type Provider, type Type } from '@nestjs/common';
3
+ import { type INestApplication, type Abstract, type INestApplicationContext, type Provider, type Type } from '@nestjs/common';
4
4
  import { type StorageBucketId } from '@dereekb/firebase';
5
5
  import { type FirebaseServerEnvironmentConfig, type NestAppPromiseGetter, type NestServerInstanceConfig } from '@dereekb/firebase-server';
6
6
  import { type TestingModule } from '@nestjs/testing';
7
- import { type ArrayOrValue, type ClassType, type Getter, Maybe } from '@dereekb/util';
7
+ import { type ArrayOrValue, type ClassType, type Getter, type Maybe } from '@dereekb/util';
8
8
  /**
9
9
  * NestJS injection token used to provide the {@link NestServerInstanceConfig} to the test's
10
10
  * {@link TestingModule}. The instance is injected during nest application creation so that
@@ -155,7 +155,9 @@ export type FirebaseAdminNestTestContextFactory<PI extends FirebaseAdminTestCont
155
155
  * @returns A new factory that nests the NestJS context inside the parent.
156
156
  */
157
157
  export declare function firebaseAdminNestContextFixture<PI extends FirebaseAdminTestContextInstance = FirebaseAdminTestContextInstance, PF extends TestContextFixture<PI> = TestContextFixture<PI>, I extends FirebaseAdminNestTestContextInstance<PI> = FirebaseAdminNestTestContextInstance<PI>, C extends FirebaseAdminNestTestContextFixture<PI, PF, I> = FirebaseAdminNestTestContextFixture<PI, PF, I>>(config: FirebaseAdminNestTestConfig<PI, PF, I, C>, factory: TestContextFactory<PF>): FirebaseAdminNestTestContextFactory<PI, PF, I, C>;
158
- /** @deprecated Use `FirebaseNestServerRootModule` from `@dereekb/firebase-server` instead. */
158
+ /**
159
+ * @deprecated Use `FirebaseNestServerRootModule` from `@dereekb/firebase-server` instead.
160
+ */
159
161
  export { FirebaseNestServerRootModule as FirebaseAdminNestRootModule } from '@dereekb/firebase-server';
160
162
  /**
161
163
  * Wires up a NestJS {@link TestingModule} inside an already-created parent fixture.
@@ -6,7 +6,9 @@ import { type WrappedCallableRequest } from './firebase.function';
6
6
  * Cloud Function wrapping capabilities.
7
7
  */
8
8
  export interface CallableRequestTestBaseConfig {
9
- /** The test context fixture providing NestJS module and function wrapping access. */
9
+ /**
10
+ * The test context fixture providing NestJS module and function wrapping access.
11
+ */
10
12
  readonly f: FirebaseAdminFunctionNestTestContext;
11
13
  }
12
14
  /**
@@ -14,7 +16,9 @@ export interface CallableRequestTestBaseConfig {
14
16
  * The `fn` factory is wrapped and provided to the test callback as a {@link WrappedCallableRequest}.
15
17
  */
16
18
  export interface CallableRequestTestSingleConfig<I, O = unknown> extends CallableRequestTestBaseConfig {
17
- /** The callable HTTP function factory to wrap for testing. */
19
+ /**
20
+ * The callable HTTP function factory to wrap for testing.
21
+ */
18
22
  readonly fn: WrapCallableRequestForNestTestsInput<I, O>;
19
23
  }
20
24
  /**
@@ -36,7 +40,9 @@ export type CallableRequestTestConfigMapObject = {
36
40
  * Each entry in `fns` is independently wrapped and exposed via a {@link CallableRequestTestMultipleFixture}.
37
41
  */
38
42
  export interface CallableRequestTestMultipleConfig<I, T extends CallableRequestTestConfigMapObject> extends CallableRequestTestBaseConfig {
39
- /** Map of named callable function factories to wrap for testing. */
43
+ /**
44
+ * Map of named callable function factories to wrap for testing.
45
+ */
40
46
  fns: T;
41
47
  }
42
48
  /**
@@ -11,7 +11,9 @@ export type CloudFunctionTestWrappedCloudFunction<I extends object> = WrappedClo
11
11
  * Cloud Function wrapping capabilities.
12
12
  */
13
13
  export interface CloudFunctionTestBaseConfig {
14
- /** The test context fixture providing NestJS module and function wrapping access. */
14
+ /**
15
+ * The test context fixture providing NestJS module and function wrapping access.
16
+ */
15
17
  f: FirebaseAdminFunctionNestTestContext;
16
18
  }
17
19
  /**
@@ -19,7 +21,9 @@ export interface CloudFunctionTestBaseConfig {
19
21
  * The `fn` factory is wrapped and provided to the test callback as a {@link WrappedCloudFunction}.
20
22
  */
21
23
  export interface CloudFunctionTestSingleConfig<I extends object> extends CloudFunctionTestBaseConfig {
22
- /** The cloud function factory to wrap for testing. */
24
+ /**
25
+ * The cloud function factory to wrap for testing.
26
+ */
23
27
  fn: WrapCloudFunctionForNestTestsInput<I>;
24
28
  }
25
29
  /**
@@ -39,7 +43,9 @@ export type CloudFunctionTestConfigMapObject = {
39
43
  * Each entry in `fns` is independently wrapped and exposed via a {@link CloudFunctionTestMultipleFixture}.
40
44
  */
41
45
  export interface CloudFunctionTestMultipleConfig<I extends object, T extends CloudFunctionTestConfigMapObject> extends CloudFunctionTestBaseConfig {
42
- /** Map of named cloud function factories to wrap for testing. */
46
+ /**
47
+ * Map of named cloud function factories to wrap for testing.
48
+ */
43
49
  fns: T;
44
50
  }
45
51
  /**
@@ -1,8 +1,8 @@
1
1
  import request from 'supertest';
2
2
  import { type INestApplication } from '@nestjs/common';
3
3
  import { AbstractTestContextFixture } from '@dereekb/util/test';
4
- import { FirebaseAdminNestTestContextFixture } from '../firebase/firebase.admin.nest';
5
- import { AuthorizedUserTestContextFixture } from '../firebase';
4
+ import { type FirebaseAdminNestTestContextFixture } from '../firebase/firebase.admin.nest';
5
+ import { type AuthorizedUserTestContextFixture } from '../firebase';
6
6
  /**
7
7
  * Configuration for {@link oAuthAuthorizedSuperTestContextFactory}.
8
8
  */
package/zoho/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dereekb/firebase-server/zoho",
3
- "version": "13.10.2",
3
+ "version": "13.10.4",
4
4
  "peerDependencies": {
5
- "@dereekb/analytics": "13.10.2",
6
- "@dereekb/date": "13.10.2",
7
- "@dereekb/model": "13.10.2",
8
- "@dereekb/nestjs": "13.10.2",
9
- "@dereekb/rxjs": "13.10.2",
10
- "@dereekb/firebase": "13.10.2",
11
- "@dereekb/util": "13.10.2",
12
- "@dereekb/zoho": "13.10.2"
5
+ "@dereekb/analytics": "13.10.4",
6
+ "@dereekb/date": "13.10.4",
7
+ "@dereekb/model": "13.10.4",
8
+ "@dereekb/nestjs": "13.10.4",
9
+ "@dereekb/rxjs": "13.10.4",
10
+ "@dereekb/firebase": "13.10.4",
11
+ "@dereekb/util": "13.10.4",
12
+ "@dereekb/zoho": "13.10.4"
13
13
  },
14
14
  "exports": {
15
15
  "./package.json": "./package.json",