@dereekb/firebase 13.10.0 → 13.10.1

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
@@ -3362,7 +3362,7 @@ function optionalFirestoreField(config) {
3362
3362
  };
3363
3363
  }
3364
3364
  fromData = function fromData(x) {
3365
- return transformFrom(x == null ? loadDefaultReadValueFn() : x);
3365
+ return transformFrom(x !== null && x !== void 0 ? x : loadDefaultReadValueFn());
3366
3366
  };
3367
3367
  } else if (transformFrom !== util.passThrough) {
3368
3368
  fromData = function fromData(x) {
@@ -4080,7 +4080,9 @@ function firestoreUniqueNumberArray(config) {
4080
4080
  performFiltering = function performFiltering(x) {
4081
4081
  var result = filterUnique(x);
4082
4082
  if (filterFn) {
4083
- result = result.filter(filterFn);
4083
+ result = result.filter(function(v, i) {
4084
+ return filterFn(v, i);
4085
+ });
4084
4086
  }
4085
4087
  return result;
4086
4088
  };
@@ -4294,10 +4296,9 @@ var assignDateCellRangeFunction = util.assignValuesToPOJOFunction({
4294
4296
  valueFilter: util.KeyValueTypleValueFilter.NULL
4295
4297
  });
4296
4298
  var firestoreDateCellRangeAssignFn = function firestoreDateCellRangeAssignFn(input) {
4299
+ var _block, _to;
4297
4300
  var block = assignDateCellRangeFunction(DEFAULT_DATE_CELL_RANGE_VALUE, input);
4298
- if (block.to == null) {
4299
- block.to = block.i;
4300
- }
4301
+ (_to = (_block = block).to) !== null && _to !== void 0 ? _to : _block.to = block.i;
4301
4302
  return block;
4302
4303
  };
4303
4304
  /**
@@ -7428,7 +7429,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
7428
7429
  * @param key
7429
7430
  * @returns
7430
7431
  */ function flatFirestoreModelKey(key) {
7431
- return key.replace(/\//g, '');
7432
+ return key.replaceAll('/', '');
7432
7433
  }
7433
7434
  /**
7434
7435
  * Creates a TwoWayFlatFirestoreModelKey from the input FirestoreModelKey.
@@ -7436,7 +7437,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
7436
7437
  * @param key
7437
7438
  * @returns
7438
7439
  */ function twoWayFlatFirestoreModelKey(key) {
7439
- return key.replace(/\//g, '_');
7440
+ return key.replaceAll('/', '_');
7440
7441
  }
7441
7442
  /**
7442
7443
  * Creates a TwoWayFlatFirestoreModelKey from the input FirestoreModelKey.
@@ -7444,7 +7445,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
7444
7445
  * @param key
7445
7446
  * @returns
7446
7447
  */ function inferKeyFromTwoWayFlatFirestoreModelKey(key) {
7447
- return key.replace(/_/g, FIRESTORE_COLLECTION_NAME_SEPARATOR);
7448
+ return key.replaceAll('_', FIRESTORE_COLLECTION_NAME_SEPARATOR);
7448
7449
  }
7449
7450
  /**
7450
7451
  * Firestore Model Id Regex
@@ -7967,7 +7968,7 @@ function _object_spread_props$e(target, source) {
7967
7968
  * // id === 'userAAAexamplecom'
7968
7969
  * ```
7969
7970
  */ function firestoreModelIdFromEmail(emailAddress) {
7970
- return emailAddress.replace('@', 'AAA').replace(/[^a-zA-Z0-9]/g, '');
7971
+ return emailAddress.replace('@', 'AAA').replaceAll(/[^a-zA-Z0-9]/g, '');
7971
7972
  }
7972
7973
 
7973
7974
  /**
@@ -17831,7 +17832,7 @@ function _ts_generator$1(thisArg, body) {
17831
17832
  ]), a = _ref[0], b = _ref[1];
17832
17833
  return [
17833
17834
  2,
17834
- _object_spread$2({}, a !== null && a !== void 0 ? a : {}, b !== null && b !== void 0 ? b : {})
17835
+ _object_spread$2({}, a, b)
17835
17836
  ];
17836
17837
  }
17837
17838
  });
package/index.esm.js CHANGED
@@ -3360,7 +3360,7 @@ function optionalFirestoreField(config) {
3360
3360
  };
3361
3361
  }
3362
3362
  fromData = function fromData(x) {
3363
- return transformFrom(x == null ? loadDefaultReadValueFn() : x);
3363
+ return transformFrom(x !== null && x !== void 0 ? x : loadDefaultReadValueFn());
3364
3364
  };
3365
3365
  } else if (transformFrom !== passThrough) {
3366
3366
  fromData = function fromData(x) {
@@ -4078,7 +4078,9 @@ function firestoreUniqueNumberArray(config) {
4078
4078
  performFiltering = function performFiltering(x) {
4079
4079
  var result = filterUnique(x);
4080
4080
  if (filterFn) {
4081
- result = result.filter(filterFn);
4081
+ result = result.filter(function(v, i) {
4082
+ return filterFn(v, i);
4083
+ });
4082
4084
  }
4083
4085
  return result;
4084
4086
  };
@@ -4292,10 +4294,9 @@ var assignDateCellRangeFunction = assignValuesToPOJOFunction({
4292
4294
  valueFilter: KeyValueTypleValueFilter.NULL
4293
4295
  });
4294
4296
  var firestoreDateCellRangeAssignFn = function firestoreDateCellRangeAssignFn(input) {
4297
+ var _block, _to;
4295
4298
  var block = assignDateCellRangeFunction(DEFAULT_DATE_CELL_RANGE_VALUE, input);
4296
- if (block.to == null) {
4297
- block.to = block.i;
4298
- }
4299
+ (_to = (_block = block).to) !== null && _to !== void 0 ? _to : _block.to = block.i;
4299
4300
  return block;
4300
4301
  };
4301
4302
  /**
@@ -7426,7 +7427,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
7426
7427
  * @param key
7427
7428
  * @returns
7428
7429
  */ function flatFirestoreModelKey(key) {
7429
- return key.replace(/\//g, '');
7430
+ return key.replaceAll('/', '');
7430
7431
  }
7431
7432
  /**
7432
7433
  * Creates a TwoWayFlatFirestoreModelKey from the input FirestoreModelKey.
@@ -7434,7 +7435,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
7434
7435
  * @param key
7435
7436
  * @returns
7436
7437
  */ function twoWayFlatFirestoreModelKey(key) {
7437
- return key.replace(/\//g, '_');
7438
+ return key.replaceAll('/', '_');
7438
7439
  }
7439
7440
  /**
7440
7441
  * Creates a TwoWayFlatFirestoreModelKey from the input FirestoreModelKey.
@@ -7442,7 +7443,7 @@ function firestoreModelIdentity(parentOrModelName, collectionNameOrModelName, in
7442
7443
  * @param key
7443
7444
  * @returns
7444
7445
  */ function inferKeyFromTwoWayFlatFirestoreModelKey(key) {
7445
- return key.replace(/_/g, FIRESTORE_COLLECTION_NAME_SEPARATOR);
7446
+ return key.replaceAll('_', FIRESTORE_COLLECTION_NAME_SEPARATOR);
7446
7447
  }
7447
7448
  /**
7448
7449
  * Firestore Model Id Regex
@@ -7965,7 +7966,7 @@ function _object_spread_props$e(target, source) {
7965
7966
  * // id === 'userAAAexamplecom'
7966
7967
  * ```
7967
7968
  */ function firestoreModelIdFromEmail(emailAddress) {
7968
- return emailAddress.replace('@', 'AAA').replace(/[^a-zA-Z0-9]/g, '');
7969
+ return emailAddress.replace('@', 'AAA').replaceAll(/[^a-zA-Z0-9]/g, '');
7969
7970
  }
7970
7971
 
7971
7972
  /**
@@ -17829,7 +17830,7 @@ function _ts_generator$1(thisArg, body) {
17829
17830
  ]), a = _ref[0], b = _ref[1];
17830
17831
  return [
17831
17832
  2,
17832
- _object_spread$2({}, a !== null && a !== void 0 ? a : {}, b !== null && b !== void 0 ? b : {})
17833
+ _object_spread$2({}, a, b)
17833
17834
  ];
17834
17835
  }
17835
17836
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/firebase",
3
- "version": "13.10.0",
3
+ "version": "13.10.1",
4
4
  "exports": {
5
5
  "./test": {
6
6
  "module": "./test/index.esm.js",
@@ -17,17 +17,17 @@
17
17
  }
18
18
  },
19
19
  "peerDependencies": {
20
- "@dereekb/util": "13.10.0",
21
- "@dereekb/date": "13.10.0",
22
- "@dereekb/model": "13.10.0",
23
- "@dereekb/rxjs": "13.10.0",
20
+ "@dereekb/util": "13.10.1",
21
+ "@dereekb/date": "13.10.1",
22
+ "@dereekb/model": "13.10.1",
23
+ "@dereekb/rxjs": "13.10.1",
24
24
  "@firebase/rules-unit-testing": "5.0.0",
25
25
  "arktype": "^2.2.0",
26
- "date-fns": "^4.0.0",
27
- "firebase": "^12.12.0",
28
- "make-error": "^1.3.0",
29
- "rxjs": "^7.8.0",
30
- "ts-essentials": "^10.0.0"
26
+ "date-fns": "^4.1.0",
27
+ "firebase": "^12.12.1",
28
+ "make-error": "^1.3.6",
29
+ "rxjs": "^7.8.2",
30
+ "ts-essentials": "^10.2.0"
31
31
  },
32
32
  "module": "./index.esm.js",
33
33
  "main": "./index.cjs.js",
@@ -91,7 +91,7 @@ export interface UpdateNotificationUserParams extends TargetModelParams {
91
91
  }
92
92
  export declare const updateNotificationUserParamsType: Type<UpdateNotificationUserParams>;
93
93
  export type ResyncNotificationUserParams = TargetModelParams;
94
- export declare const resyncNotificationUserParamsType: Type<ResyncNotificationUserParams>;
94
+ export declare const resyncNotificationUserParamsType: import("arktype/internal/variants/object.ts").ObjectType<TargetModelParams, {}>;
95
95
  export interface ResyncNotificationUserResult {
96
96
  readonly notificationBoxesUpdated: number;
97
97
  }
@@ -156,7 +156,7 @@ export interface InitializeAllApplicableNotificationSummariesResult {
156
156
  * Used for updating the NotificationBox.
157
157
  */
158
158
  export type UpdateNotificationBoxParams = TargetModelParams;
159
- export declare const updateNotificationBoxParamsType: Type<UpdateNotificationBoxParams>;
159
+ export declare const updateNotificationBoxParamsType: import("arktype/internal/variants/object.ts").ObjectType<TargetModelParams, {}>;
160
160
  /**
161
161
  * Used to create/update a notification box recipient.
162
162
  */
@@ -69,13 +69,13 @@ export interface UpdateOidcClientParams extends UpdateOidcClientFieldParams, Tar
69
69
  }
70
70
  export declare const updateOidcClientParamsType: Type<UpdateOidcClientParams>;
71
71
  export type RotateOidcClientSecretParams = TargetModelParams;
72
- export declare const rotateOidcClientSecretParamsType: Type<RotateOidcClientSecretParams>;
72
+ export declare const rotateOidcClientSecretParamsType: import("arktype/internal/variants/object.ts").ObjectType<TargetModelParams, {}>;
73
73
  export type RotateOidcClientSecretResult = Pick<CreateOidcClientResult, 'client_id' | 'client_secret'>;
74
74
  /**
75
75
  * Parameters for revoking/deleting an OAuth client.
76
76
  */
77
77
  export type DeleteOidcClientParams = TargetModelParams;
78
- export declare const deleteOidcClientParamsType: Type<DeleteOidcClientParams>;
78
+ export declare const deleteOidcClientParamsType: import("arktype/internal/variants/object.ts").ObjectType<TargetModelParams, {}>;
79
79
  /**
80
80
  * Custom (non-CRUD) function type map for OIDC.
81
81
  */
@@ -29,7 +29,7 @@ export declare const oidcEntryIdentity: import("../..").RootFirestoreModelIdenti
29
29
  *
30
30
  * Used as the discriminator in the {@link OidcEntry.type} field.
31
31
  */
32
- export type OidcEntryType = 'Session' | 'AccessToken' | 'AuthorizationCode' | 'RefreshToken' | 'DeviceCode' | 'ClientCredentials' | 'Client' | 'InitialAccessToken' | 'RegistrationAccessToken' | 'Interaction' | 'ReplayDetection' | 'PushedAuthorizationRequest' | 'Grant' | 'BackchannelAuthenticationRequest' | string;
32
+ export type OidcEntryType = 'Session' | 'AccessToken' | 'AuthorizationCode' | 'RefreshToken' | 'DeviceCode' | 'ClientCredentials' | 'Client' | 'InitialAccessToken' | 'RegistrationAccessToken' | 'Interaction' | 'ReplayDetection' | 'PushedAuthorizationRequest' | 'Grant' | 'BackchannelAuthenticationRequest' | (string & {});
33
33
  /**
34
34
  * Type value for Client adapter entries.
35
35
  */
package/test/index.cjs.js CHANGED
@@ -4882,6 +4882,7 @@ function _async_to_generator$3(fn) {
4882
4882
  };
4883
4883
  }
4884
4884
  function _instanceof(left, right) {
4885
+ "@swc/helpers - instanceof";
4885
4886
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
4886
4887
  return !!right[Symbol.hasInstance](left);
4887
4888
  } else {
package/test/index.esm.js CHANGED
@@ -4880,6 +4880,7 @@ function _async_to_generator$3(fn) {
4880
4880
  };
4881
4881
  }
4882
4882
  function _instanceof(left, right) {
4883
+ "@swc/helpers - instanceof";
4883
4884
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
4884
4885
  return !!right[Symbol.hasInstance](left);
4885
4886
  } else {
package/test/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@dereekb/firebase/test",
3
- "version": "13.10.0",
3
+ "version": "13.10.1",
4
4
  "peerDependencies": {
5
- "@dereekb/date": "13.10.0",
6
- "@dereekb/firebase": "13.10.0",
7
- "@dereekb/model": "13.10.0",
8
- "@dereekb/rxjs": "13.10.0",
9
- "@dereekb/util": "13.10.0",
5
+ "@dereekb/date": "13.10.1",
6
+ "@dereekb/firebase": "13.10.1",
7
+ "@dereekb/model": "13.10.1",
8
+ "@dereekb/rxjs": "13.10.1",
9
+ "@dereekb/util": "13.10.1",
10
10
  "@firebase/rules-unit-testing": "5.0.0",
11
- "date-fns": "^4.0.0",
12
- "firebase": "^12.12.0",
13
- "rxjs": "^7.8.0"
11
+ "date-fns": "^4.1.0",
12
+ "firebase": "^12.12.1",
13
+ "rxjs": "^7.8.2"
14
14
  },
15
15
  "exports": {
16
16
  "./package.json": "./package.json",