@dereekb/firebase-server 13.6.10 → 13.6.11
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 +233 -89
- package/index.esm.js +234 -90
- package/mailgun/package.json +9 -9
- package/model/index.cjs.js +207 -63
- package/model/index.esm.js +208 -66
- package/model/package.json +9 -9
- package/model/src/lib/storagefile/storagefile.action.server.d.ts +69 -5
- package/oidc/package.json +10 -10
- package/package.json +10 -10
- package/src/lib/nest/nest.provider.d.ts +82 -0
- package/test/package.json +10 -10
- package/zoho/package.json +9 -9
package/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DBX_FIREBASE_SERVER_NO_AUTH_ERROR_CODE, FIREBASE_AUTH_USER_NOT_FOUND_ERROR, FIREBASE_SERVER_AUTH_CLAIMS_RESET_PASSWORD_KEY, FIREBASE_SERVER_AUTH_CLAIMS_RESET_LAST_COM_DATE_KEY, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_PASSWORD_KEY, FIREBASE_AUTH_PHONE_NUMBER_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_EMAIL_ALREADY_EXISTS_ERROR, FIREBASE_AUTH_INVALID_PHONE_NUMBER_ERROR, FIREBASE_SERVER_AUTH_CLAIMS_SETUP_LAST_COM_DATE_KEY, FirestoreDocumentContextType, streamFromOnSnapshot, makeFirestoreQueryConstraintFunctionsDriver, FIRESTORE_LIMIT_QUERY_CONSTRAINT_TYPE, FIRESTORE_LIMIT_TO_LAST_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_QUERY_CONSTRAINT_TYPE, FIRESTORE_ORDER_BY_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_QUERY_CONSTRAINT_TYPE, FIRESTORE_WHERE_DOCUMENT_ID_QUERY_CONSTRAINT_TYPE, FIRESTORE_OFFSET_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_START_AFTER_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_AT_VALUE_QUERY_CONSTRAINT_TYPE, FIRESTORE_END_BEFORE_QUERY_CONSTRAINT_TYPE, firestoreContextFactory, firestoreField, optionalFirestoreField, setIdAndKeyFromKeyIdRefOnDocumentData, MODEL_FUNCTION_FIREBASE_CRUD_FUNCTION_SPECIFIER_DEFAULT, ScheduledFunctionDevelopmentFunctionTypeEnum, SCHEDULED_FUNCTION_DEV_FUNCTION_SPECIFIER, storageListFilesResultFactory, assertStorageUploadOptionsStringFormat, firebaseStorageContextFactory, inContextFirebaseModelsServiceFactory, useFirebaseModelsService } from '@dereekb/firebase';
|
|
2
|
-
import { partialServerError, isServerError, randomNumberFactory, cachedGetter, filterNullAndUndefinedValues, asSet, AUTH_ADMIN_ROLE, AUTH_TOS_SIGNED_ROLE, forEachKeyValue, KeyValueTypleValueFilter, filterUndefinedValues, isThrottled, mapObjectMap, batch, objectToMap, serverError, asArray, containsAllValues, websiteUrlDetails, mergeObjects, cronExpressionRepeatingEveryNMinutes, mapIdentityFunction, slashPathName, toRelativeSlashPathStartType, fixMultiSlashesInSlashPath, SLASH_PATH_SEPARATOR, objectHasNoKeys, websiteUrlFromPaths, pushItemOrArrayItemsIntoArray, makeGetter, asGetter, build } from '@dereekb/util';
|
|
2
|
+
import { partialServerError, isServerError, randomNumberFactory, cachedGetter, filterNullAndUndefinedValues, asSet, AUTH_ADMIN_ROLE, AUTH_TOS_SIGNED_ROLE, forEachKeyValue, KeyValueTypleValueFilter, filterUndefinedValues, isThrottled, mapObjectMap, batch, objectToMap, serverError, asArray, containsAllValues, websiteUrlDetails, mergeObjects, cronExpressionRepeatingEveryNMinutes, mapIdentityFunction, slashPathName, toRelativeSlashPathStartType, fixMultiSlashesInSlashPath, SLASH_PATH_SEPARATOR, objectHasNoKeys, websiteUrlFromPaths, pushItemOrArrayItemsIntoArray, makeGetter, asGetter, build, performAsyncTasks } from '@dereekb/util';
|
|
3
3
|
import { HttpsError } from 'firebase-functions/https';
|
|
4
4
|
import { hoursToMs, toISODateString } from '@dereekb/date';
|
|
5
5
|
import { BaseError } from 'make-error';
|
|
@@ -801,16 +801,16 @@ function _is_native_reflect_construct$5() {
|
|
|
801
801
|
}
|
|
802
802
|
(BaseError);
|
|
803
803
|
|
|
804
|
-
function _array_like_to_array$
|
|
804
|
+
function _array_like_to_array$b(arr, len) {
|
|
805
805
|
if (len == null || len > arr.length) len = arr.length;
|
|
806
806
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
807
807
|
return arr2;
|
|
808
808
|
}
|
|
809
|
-
function _array_with_holes$
|
|
809
|
+
function _array_with_holes$4(arr) {
|
|
810
810
|
if (Array.isArray(arr)) return arr;
|
|
811
811
|
}
|
|
812
812
|
function _array_without_holes$7(arr) {
|
|
813
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
813
|
+
if (Array.isArray(arr)) return _array_like_to_array$b(arr);
|
|
814
814
|
}
|
|
815
815
|
function _assert_this_initialized$4(self) {
|
|
816
816
|
if (self === void 0) {
|
|
@@ -904,7 +904,7 @@ function _inherits$4(subClass, superClass) {
|
|
|
904
904
|
function _iterable_to_array$7(iter) {
|
|
905
905
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
906
906
|
}
|
|
907
|
-
function _iterable_to_array_limit$
|
|
907
|
+
function _iterable_to_array_limit$4(arr, i) {
|
|
908
908
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
909
909
|
if (_i == null) return;
|
|
910
910
|
var _arr = [];
|
|
@@ -928,7 +928,7 @@ function _iterable_to_array_limit$3(arr, i) {
|
|
|
928
928
|
}
|
|
929
929
|
return _arr;
|
|
930
930
|
}
|
|
931
|
-
function _non_iterable_rest$
|
|
931
|
+
function _non_iterable_rest$4() {
|
|
932
932
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
933
933
|
}
|
|
934
934
|
function _non_iterable_spread$7() {
|
|
@@ -962,23 +962,23 @@ function _set_prototype_of$4(o, p) {
|
|
|
962
962
|
};
|
|
963
963
|
return _set_prototype_of$4(o, p);
|
|
964
964
|
}
|
|
965
|
-
function _sliced_to_array$
|
|
966
|
-
return _array_with_holes$
|
|
965
|
+
function _sliced_to_array$4(arr, i) {
|
|
966
|
+
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$4();
|
|
967
967
|
}
|
|
968
968
|
function _to_consumable_array$7(arr) {
|
|
969
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$
|
|
969
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$7();
|
|
970
970
|
}
|
|
971
971
|
function _type_of$5(obj) {
|
|
972
972
|
"@swc/helpers - typeof";
|
|
973
973
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
974
974
|
}
|
|
975
|
-
function _unsupported_iterable_to_array$
|
|
975
|
+
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
976
976
|
if (!o) return;
|
|
977
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
977
|
+
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
978
978
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
979
979
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
980
980
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
981
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
981
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
|
|
982
982
|
}
|
|
983
983
|
function _is_native_reflect_construct$4() {
|
|
984
984
|
try {
|
|
@@ -1334,7 +1334,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
1334
1334
|
claims = {};
|
|
1335
1335
|
forEachKeyValue(baseClaims, {
|
|
1336
1336
|
forEach: function forEach(param) {
|
|
1337
|
-
var _param = _sliced_to_array$
|
|
1337
|
+
var _param = _sliced_to_array$4(param, 1), key = _param[0];
|
|
1338
1338
|
claims[key] = null; // set null on every key
|
|
1339
1339
|
},
|
|
1340
1340
|
filter: KeyValueTypleValueFilter.NONE // don't skip any key/value
|
|
@@ -2285,13 +2285,13 @@ function _class_call_check$m(instance, Constructor) {
|
|
|
2285
2285
|
});
|
|
2286
2286
|
}
|
|
2287
2287
|
|
|
2288
|
-
function _array_like_to_array$
|
|
2288
|
+
function _array_like_to_array$a(arr, len) {
|
|
2289
2289
|
if (len == null || len > arr.length) len = arr.length;
|
|
2290
2290
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2291
2291
|
return arr2;
|
|
2292
2292
|
}
|
|
2293
2293
|
function _array_without_holes$6(arr) {
|
|
2294
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
2294
|
+
if (Array.isArray(arr)) return _array_like_to_array$a(arr);
|
|
2295
2295
|
}
|
|
2296
2296
|
function _define_property$r(obj, key, value) {
|
|
2297
2297
|
if (key in obj) {
|
|
@@ -2328,15 +2328,15 @@ function _object_spread$f(target) {
|
|
|
2328
2328
|
return target;
|
|
2329
2329
|
}
|
|
2330
2330
|
function _to_consumable_array$6(arr) {
|
|
2331
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$
|
|
2331
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$6();
|
|
2332
2332
|
}
|
|
2333
|
-
function _unsupported_iterable_to_array$
|
|
2333
|
+
function _unsupported_iterable_to_array$a(o, minLen) {
|
|
2334
2334
|
if (!o) return;
|
|
2335
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2335
|
+
if (typeof o === "string") return _array_like_to_array$a(o, minLen);
|
|
2336
2336
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2337
2337
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2338
2338
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2339
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2339
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
|
|
2340
2340
|
}
|
|
2341
2341
|
/**
|
|
2342
2342
|
* Converts a {@link FirestoreAccessorArrayUpdate} into Firestore {@link UpdateData} using
|
|
@@ -2895,12 +2895,12 @@ function _define_property$o(obj, key, value) {
|
|
|
2895
2895
|
return new TransactionFirestoreDocumentContext(transaction);
|
|
2896
2896
|
}
|
|
2897
2897
|
|
|
2898
|
-
function _array_like_to_array$
|
|
2898
|
+
function _array_like_to_array$9(arr, len) {
|
|
2899
2899
|
if (len == null || len > arr.length) len = arr.length;
|
|
2900
2900
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2901
2901
|
return arr2;
|
|
2902
2902
|
}
|
|
2903
|
-
function _array_with_holes$
|
|
2903
|
+
function _array_with_holes$3(arr) {
|
|
2904
2904
|
if (Array.isArray(arr)) return arr;
|
|
2905
2905
|
}
|
|
2906
2906
|
function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -2932,7 +2932,7 @@ function _async_to_generator$a(fn) {
|
|
|
2932
2932
|
});
|
|
2933
2933
|
};
|
|
2934
2934
|
}
|
|
2935
|
-
function _iterable_to_array_limit$
|
|
2935
|
+
function _iterable_to_array_limit$3(arr, i) {
|
|
2936
2936
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2937
2937
|
if (_i == null) return;
|
|
2938
2938
|
var _arr = [];
|
|
@@ -2956,19 +2956,19 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
2956
2956
|
}
|
|
2957
2957
|
return _arr;
|
|
2958
2958
|
}
|
|
2959
|
-
function _non_iterable_rest$
|
|
2959
|
+
function _non_iterable_rest$3() {
|
|
2960
2960
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2961
2961
|
}
|
|
2962
|
-
function _sliced_to_array$
|
|
2963
|
-
return _array_with_holes$
|
|
2962
|
+
function _sliced_to_array$3(arr, i) {
|
|
2963
|
+
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$3();
|
|
2964
2964
|
}
|
|
2965
|
-
function _unsupported_iterable_to_array$
|
|
2965
|
+
function _unsupported_iterable_to_array$9(o, minLen) {
|
|
2966
2966
|
if (!o) return;
|
|
2967
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2967
|
+
if (typeof o === "string") return _array_like_to_array$9(o, minLen);
|
|
2968
2968
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2969
2969
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2970
2970
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2971
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2971
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
|
|
2972
2972
|
}
|
|
2973
2973
|
function _ts_generator$a(thisArg, body) {
|
|
2974
2974
|
var f, y, t, _ = {
|
|
@@ -3093,7 +3093,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
3093
3093
|
}
|
|
3094
3094
|
var batches = batch(pathSegments, 2); // batch to tuple [string, string]
|
|
3095
3095
|
batches.forEach(function(x) {
|
|
3096
|
-
var _x = _sliced_to_array$
|
|
3096
|
+
var _x = _sliced_to_array$3(x, 2), first = _x[0], second = _x[1];
|
|
3097
3097
|
ref = ref.doc(first).collection(second);
|
|
3098
3098
|
});
|
|
3099
3099
|
}
|
|
@@ -3120,7 +3120,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
3120
3120
|
if (pathSegments === null || pathSegments === void 0 ? void 0 : pathSegments.length) {
|
|
3121
3121
|
var batches = batch(pathSegments, 2); // batch to tuple [string, string]
|
|
3122
3122
|
batches.forEach(function(x) {
|
|
3123
|
-
var _x = _sliced_to_array$
|
|
3123
|
+
var _x = _sliced_to_array$3(x, 2), first = _x[0], second = _x[1];
|
|
3124
3124
|
var collection = doc.collection(first);
|
|
3125
3125
|
doc = second ? collection.doc(second) : collection.doc();
|
|
3126
3126
|
});
|
|
@@ -3188,13 +3188,13 @@ function _ts_generator$a(thisArg, body) {
|
|
|
3188
3188
|
};
|
|
3189
3189
|
}
|
|
3190
3190
|
|
|
3191
|
-
function _array_like_to_array$
|
|
3191
|
+
function _array_like_to_array$8(arr, len) {
|
|
3192
3192
|
if (len == null || len > arr.length) len = arr.length;
|
|
3193
3193
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3194
3194
|
return arr2;
|
|
3195
3195
|
}
|
|
3196
3196
|
function _array_without_holes$5(arr) {
|
|
3197
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
3197
|
+
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
3198
3198
|
}
|
|
3199
3199
|
function _define_property$n(obj, key, value) {
|
|
3200
3200
|
if (key in obj) {
|
|
@@ -3250,15 +3250,15 @@ function _object_spread_props$c(target, source) {
|
|
|
3250
3250
|
return target;
|
|
3251
3251
|
}
|
|
3252
3252
|
function _to_consumable_array$5(arr) {
|
|
3253
|
-
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$
|
|
3253
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$5();
|
|
3254
3254
|
}
|
|
3255
|
-
function _unsupported_iterable_to_array$
|
|
3255
|
+
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
3256
3256
|
if (!o) return;
|
|
3257
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3257
|
+
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
3258
3258
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3259
3259
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3260
3260
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3261
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3261
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
3262
3262
|
}
|
|
3263
3263
|
var _builder, _builder1;
|
|
3264
3264
|
var _obj;
|
|
@@ -4234,15 +4234,15 @@ function _ts_generator$8(thisArg, body) {
|
|
|
4234
4234
|
})();
|
|
4235
4235
|
}
|
|
4236
4236
|
|
|
4237
|
-
function _array_like_to_array$
|
|
4237
|
+
function _array_like_to_array$7(arr, len) {
|
|
4238
4238
|
if (len == null || len > arr.length) len = arr.length;
|
|
4239
4239
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4240
4240
|
return arr2;
|
|
4241
4241
|
}
|
|
4242
|
-
function _array_with_holes$
|
|
4242
|
+
function _array_with_holes$2(arr) {
|
|
4243
4243
|
if (Array.isArray(arr)) return arr;
|
|
4244
4244
|
}
|
|
4245
|
-
function _iterable_to_array_limit$
|
|
4245
|
+
function _iterable_to_array_limit$2(arr, i) {
|
|
4246
4246
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
4247
4247
|
if (_i == null) return;
|
|
4248
4248
|
var _arr = [];
|
|
@@ -4266,7 +4266,7 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
4266
4266
|
}
|
|
4267
4267
|
return _arr;
|
|
4268
4268
|
}
|
|
4269
|
-
function _non_iterable_rest$
|
|
4269
|
+
function _non_iterable_rest$2() {
|
|
4270
4270
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4271
4271
|
}
|
|
4272
4272
|
function _object_without_properties(source, excluded) {
|
|
@@ -4305,16 +4305,16 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
4305
4305
|
}
|
|
4306
4306
|
return target;
|
|
4307
4307
|
}
|
|
4308
|
-
function _sliced_to_array$
|
|
4309
|
-
return _array_with_holes$
|
|
4308
|
+
function _sliced_to_array$2(arr, i) {
|
|
4309
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$2();
|
|
4310
4310
|
}
|
|
4311
|
-
function _unsupported_iterable_to_array$
|
|
4311
|
+
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
4312
4312
|
if (!o) return;
|
|
4313
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
4313
|
+
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
4314
4314
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4315
4315
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4316
4316
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
4317
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
4317
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
4318
4318
|
}
|
|
4319
4319
|
// MARK: Type Guards
|
|
4320
4320
|
/**
|
|
@@ -4415,7 +4415,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4415
4415
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4416
4416
|
try {
|
|
4417
4417
|
for(var _iterator = Object.entries(config)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4418
|
-
var _step_value = _sliced_to_array$
|
|
4418
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), key = _step_value[0], handler = _step_value[1];
|
|
4419
4419
|
var details = readApiDetails(handler);
|
|
4420
4420
|
if (details != null) {
|
|
4421
4421
|
// At the specifier level, details should be handler-level (OnCallModelFunctionApiDetails)
|
|
@@ -4455,7 +4455,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4455
4455
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4456
4456
|
try {
|
|
4457
4457
|
for(var _iterator = Object.entries(map)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4458
|
-
var _step_value = _sliced_to_array$
|
|
4458
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), key = _step_value[0], handler = _step_value[1];
|
|
4459
4459
|
var details = readApiDetails(handler);
|
|
4460
4460
|
if (details != null) {
|
|
4461
4461
|
if (isOnCallModelTypeApiDetails(details)) {
|
|
@@ -4504,7 +4504,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4504
4504
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4505
4505
|
try {
|
|
4506
4506
|
for(var _iterator = Object.entries(map)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4507
|
-
var _step_value = _sliced_to_array$
|
|
4507
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), call = _step_value[0], handler = _step_value[1];
|
|
4508
4508
|
var details = readApiDetails(handler);
|
|
4509
4509
|
if (details != null) {
|
|
4510
4510
|
result[call] = details;
|
|
@@ -4553,14 +4553,14 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4553
4553
|
try {
|
|
4554
4554
|
// Pivot: iterate CRUD types, then model types within each
|
|
4555
4555
|
for(var _iterator = Object.entries(topDetails)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4556
|
-
var _step_value = _sliced_to_array$
|
|
4556
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), callType = _step_value[0], crudDetails = _step_value[1];
|
|
4557
4557
|
if (crudDetails == null) {
|
|
4558
4558
|
continue;
|
|
4559
4559
|
}
|
|
4560
4560
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
4561
4561
|
try {
|
|
4562
4562
|
for(var _iterator1 = Object.entries(crudDetails.modelTypes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
4563
|
-
var _step_value1 = _sliced_to_array$
|
|
4563
|
+
var _step_value1 = _sliced_to_array$2(_step1.value, 2), modelType = _step_value1[0], modelDetails = _step_value1[1];
|
|
4564
4564
|
if (modelDetails == null) {
|
|
4565
4565
|
continue;
|
|
4566
4566
|
}
|
|
@@ -5178,13 +5178,13 @@ function _object_spread_props$b(target, source) {
|
|
|
5178
5178
|
}));
|
|
5179
5179
|
}
|
|
5180
5180
|
|
|
5181
|
-
function _array_like_to_array$
|
|
5181
|
+
function _array_like_to_array$6(arr, len) {
|
|
5182
5182
|
if (len == null || len > arr.length) len = arr.length;
|
|
5183
5183
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5184
5184
|
return arr2;
|
|
5185
5185
|
}
|
|
5186
5186
|
function _array_without_holes$4(arr) {
|
|
5187
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
5187
|
+
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
5188
5188
|
}
|
|
5189
5189
|
function _iterable_to_array$4(iter) {
|
|
5190
5190
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -5193,15 +5193,15 @@ function _non_iterable_spread$4() {
|
|
|
5193
5193
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5194
5194
|
}
|
|
5195
5195
|
function _to_consumable_array$4(arr) {
|
|
5196
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$
|
|
5196
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
|
|
5197
5197
|
}
|
|
5198
|
-
function _unsupported_iterable_to_array$
|
|
5198
|
+
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
5199
5199
|
if (!o) return;
|
|
5200
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5200
|
+
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
5201
5201
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5202
5202
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5203
5203
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5204
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5204
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
5205
5205
|
}
|
|
5206
5206
|
/**
|
|
5207
5207
|
* Generates NestJS {@link ModuleMetadata} for an app's analytics module.
|
|
@@ -5891,12 +5891,12 @@ function _object_spread_props$8(target, source) {
|
|
|
5891
5891
|
});
|
|
5892
5892
|
}
|
|
5893
5893
|
|
|
5894
|
-
function _array_like_to_array$
|
|
5894
|
+
function _array_like_to_array$5(arr, len) {
|
|
5895
5895
|
if (len == null || len > arr.length) len = arr.length;
|
|
5896
5896
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5897
5897
|
return arr2;
|
|
5898
5898
|
}
|
|
5899
|
-
function _array_with_holes(arr) {
|
|
5899
|
+
function _array_with_holes$1(arr) {
|
|
5900
5900
|
if (Array.isArray(arr)) return arr;
|
|
5901
5901
|
}
|
|
5902
5902
|
function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -5928,7 +5928,7 @@ function _async_to_generator$7(fn) {
|
|
|
5928
5928
|
});
|
|
5929
5929
|
};
|
|
5930
5930
|
}
|
|
5931
|
-
function _iterable_to_array_limit(arr, i) {
|
|
5931
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
5932
5932
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5933
5933
|
if (_i == null) return;
|
|
5934
5934
|
var _arr = [];
|
|
@@ -5952,19 +5952,19 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
5952
5952
|
}
|
|
5953
5953
|
return _arr;
|
|
5954
5954
|
}
|
|
5955
|
-
function _non_iterable_rest() {
|
|
5955
|
+
function _non_iterable_rest$1() {
|
|
5956
5956
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5957
5957
|
}
|
|
5958
|
-
function _sliced_to_array(arr, i) {
|
|
5959
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$
|
|
5958
|
+
function _sliced_to_array$1(arr, i) {
|
|
5959
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$1();
|
|
5960
5960
|
}
|
|
5961
|
-
function _unsupported_iterable_to_array$
|
|
5961
|
+
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
5962
5962
|
if (!o) return;
|
|
5963
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5963
|
+
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
5964
5964
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5965
5965
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5966
5966
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5967
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5967
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
5968
5968
|
}
|
|
5969
5969
|
function _ts_generator$7(thisArg, body) {
|
|
5970
5970
|
var f, y, t, _ = {
|
|
@@ -6095,7 +6095,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
6095
6095
|
var result = [];
|
|
6096
6096
|
forEachKeyValue(allScheduledFunctions, {
|
|
6097
6097
|
forEach: function forEach(x) {
|
|
6098
|
-
var _x = _sliced_to_array(x, 1), functionName = _x[0];
|
|
6098
|
+
var _x = _sliced_to_array$1(x, 1), functionName = _x[0];
|
|
6099
6099
|
result.push({
|
|
6100
6100
|
name: functionName.toString()
|
|
6101
6101
|
});
|
|
@@ -6571,13 +6571,13 @@ DefaultFirebaseServerEnvService = __decorate([
|
|
|
6571
6571
|
};
|
|
6572
6572
|
}
|
|
6573
6573
|
|
|
6574
|
-
function _array_like_to_array$
|
|
6574
|
+
function _array_like_to_array$4(arr, len) {
|
|
6575
6575
|
if (len == null || len > arr.length) len = arr.length;
|
|
6576
6576
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6577
6577
|
return arr2;
|
|
6578
6578
|
}
|
|
6579
6579
|
function _array_without_holes$3(arr) {
|
|
6580
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6580
|
+
if (Array.isArray(arr)) return _array_like_to_array$4(arr);
|
|
6581
6581
|
}
|
|
6582
6582
|
function _class_call_check$b(instance, Constructor) {
|
|
6583
6583
|
if (!(instance instanceof Constructor)) {
|
|
@@ -6591,15 +6591,15 @@ function _non_iterable_spread$3() {
|
|
|
6591
6591
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6592
6592
|
}
|
|
6593
6593
|
function _to_consumable_array$3(arr) {
|
|
6594
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$
|
|
6594
|
+
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
|
|
6595
6595
|
}
|
|
6596
|
-
function _unsupported_iterable_to_array$
|
|
6596
|
+
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
6597
6597
|
if (!o) return;
|
|
6598
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6598
|
+
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
6599
6599
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6600
6600
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6601
6601
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6602
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6602
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
6603
6603
|
}
|
|
6604
6604
|
// MARK: Tokens
|
|
6605
6605
|
/**
|
|
@@ -7929,13 +7929,13 @@ FirebaseAppCheckMiddleware = __decorate([
|
|
|
7929
7929
|
})();
|
|
7930
7930
|
}
|
|
7931
7931
|
|
|
7932
|
-
function _array_like_to_array$
|
|
7932
|
+
function _array_like_to_array$3(arr, len) {
|
|
7933
7933
|
if (len == null || len > arr.length) len = arr.length;
|
|
7934
7934
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
7935
7935
|
return arr2;
|
|
7936
7936
|
}
|
|
7937
7937
|
function _array_without_holes$2(arr) {
|
|
7938
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
7938
|
+
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
7939
7939
|
}
|
|
7940
7940
|
function _class_call_check$7(instance, Constructor) {
|
|
7941
7941
|
if (!(instance instanceof Constructor)) {
|
|
@@ -7975,15 +7975,15 @@ function _non_iterable_spread$2() {
|
|
|
7975
7975
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7976
7976
|
}
|
|
7977
7977
|
function _to_consumable_array$2(arr) {
|
|
7978
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$
|
|
7978
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$2();
|
|
7979
7979
|
}
|
|
7980
|
-
function _unsupported_iterable_to_array$
|
|
7980
|
+
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
7981
7981
|
if (!o) return;
|
|
7982
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
7982
|
+
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
7983
7983
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
7984
7984
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
7985
7985
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
7986
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
7986
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
7987
7987
|
}
|
|
7988
7988
|
/**
|
|
7989
7989
|
* Middleware module that configures `FirebaseAppCheckMiddleware` route coverage
|
|
@@ -9103,13 +9103,13 @@ function _define_property$4(obj, key, value) {
|
|
|
9103
9103
|
return storage.storageClient;
|
|
9104
9104
|
}
|
|
9105
9105
|
|
|
9106
|
-
function _array_like_to_array$
|
|
9106
|
+
function _array_like_to_array$2(arr, len) {
|
|
9107
9107
|
if (len == null || len > arr.length) len = arr.length;
|
|
9108
9108
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9109
9109
|
return arr2;
|
|
9110
9110
|
}
|
|
9111
9111
|
function _array_without_holes$1(arr) {
|
|
9112
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
9112
|
+
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
9113
9113
|
}
|
|
9114
9114
|
function _class_call_check$3(instance, Constructor) {
|
|
9115
9115
|
if (!(instance instanceof Constructor)) {
|
|
@@ -9170,15 +9170,15 @@ function _object_spread_props$1(target, source) {
|
|
|
9170
9170
|
return target;
|
|
9171
9171
|
}
|
|
9172
9172
|
function _to_consumable_array$1(arr) {
|
|
9173
|
-
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$
|
|
9173
|
+
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
|
|
9174
9174
|
}
|
|
9175
|
-
function _unsupported_iterable_to_array$
|
|
9175
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
9176
9176
|
if (!o) return;
|
|
9177
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
9177
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
9178
9178
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9179
9179
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9180
9180
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9181
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
9181
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
9182
9182
|
}
|
|
9183
9183
|
// MARK: Tokens
|
|
9184
9184
|
/**
|
|
@@ -9328,13 +9328,13 @@ FirebaseServerStorageContextModule = __decorate([
|
|
|
9328
9328
|
}, config);
|
|
9329
9329
|
}
|
|
9330
9330
|
|
|
9331
|
-
function _array_like_to_array(arr, len) {
|
|
9331
|
+
function _array_like_to_array$1(arr, len) {
|
|
9332
9332
|
if (len == null || len > arr.length) len = arr.length;
|
|
9333
9333
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9334
9334
|
return arr2;
|
|
9335
9335
|
}
|
|
9336
9336
|
function _array_without_holes(arr) {
|
|
9337
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
9337
|
+
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
9338
9338
|
}
|
|
9339
9339
|
function _class_call_check$2(instance, Constructor) {
|
|
9340
9340
|
if (!(instance instanceof Constructor)) {
|
|
@@ -9395,15 +9395,15 @@ function _object_spread_props(target, source) {
|
|
|
9395
9395
|
return target;
|
|
9396
9396
|
}
|
|
9397
9397
|
function _to_consumable_array(arr) {
|
|
9398
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
9398
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
|
|
9399
9399
|
}
|
|
9400
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
9400
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
9401
9401
|
if (!o) return;
|
|
9402
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
9402
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
9403
9403
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9404
9404
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9405
9405
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9406
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
9406
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
9407
9407
|
}
|
|
9408
9408
|
// MARK: Assets
|
|
9409
9409
|
/**
|
|
@@ -9763,6 +9763,14 @@ function _ts_generator$1(thisArg, body) {
|
|
|
9763
9763
|
};
|
|
9764
9764
|
}
|
|
9765
9765
|
|
|
9766
|
+
function _array_like_to_array(arr, len) {
|
|
9767
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9768
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9769
|
+
return arr2;
|
|
9770
|
+
}
|
|
9771
|
+
function _array_with_holes(arr) {
|
|
9772
|
+
if (Array.isArray(arr)) return arr;
|
|
9773
|
+
}
|
|
9766
9774
|
function _assert_this_initialized(self) {
|
|
9767
9775
|
if (self === void 0) {
|
|
9768
9776
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -9852,6 +9860,33 @@ function _inherits(subClass, superClass) {
|
|
|
9852
9860
|
});
|
|
9853
9861
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
9854
9862
|
}
|
|
9863
|
+
function _iterable_to_array_limit(arr, i) {
|
|
9864
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
9865
|
+
if (_i == null) return;
|
|
9866
|
+
var _arr = [];
|
|
9867
|
+
var _n = true;
|
|
9868
|
+
var _d = false;
|
|
9869
|
+
var _s, _e;
|
|
9870
|
+
try {
|
|
9871
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
9872
|
+
_arr.push(_s.value);
|
|
9873
|
+
if (i && _arr.length === i) break;
|
|
9874
|
+
}
|
|
9875
|
+
} catch (err) {
|
|
9876
|
+
_d = true;
|
|
9877
|
+
_e = err;
|
|
9878
|
+
} finally{
|
|
9879
|
+
try {
|
|
9880
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
9881
|
+
} finally{
|
|
9882
|
+
if (_d) throw _e;
|
|
9883
|
+
}
|
|
9884
|
+
}
|
|
9885
|
+
return _arr;
|
|
9886
|
+
}
|
|
9887
|
+
function _non_iterable_rest() {
|
|
9888
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9889
|
+
}
|
|
9855
9890
|
function _possible_constructor_return(self, call) {
|
|
9856
9891
|
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
9857
9892
|
return call;
|
|
@@ -9865,10 +9900,21 @@ function _set_prototype_of(o, p) {
|
|
|
9865
9900
|
};
|
|
9866
9901
|
return _set_prototype_of(o, p);
|
|
9867
9902
|
}
|
|
9903
|
+
function _sliced_to_array(arr, i) {
|
|
9904
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
9905
|
+
}
|
|
9868
9906
|
function _type_of(obj) {
|
|
9869
9907
|
"@swc/helpers - typeof";
|
|
9870
9908
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
9871
9909
|
}
|
|
9910
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
9911
|
+
if (!o) return;
|
|
9912
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
9913
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9914
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9915
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9916
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
9917
|
+
}
|
|
9872
9918
|
function _is_native_reflect_construct() {
|
|
9873
9919
|
try {
|
|
9874
9920
|
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
@@ -10105,6 +10151,104 @@ function _ts_generator(thisArg, body) {
|
|
|
10105
10151
|
});
|
|
10106
10152
|
}).call(this);
|
|
10107
10153
|
}
|
|
10154
|
+
},
|
|
10155
|
+
{
|
|
10156
|
+
key: "useMultipleModels",
|
|
10157
|
+
value: /**
|
|
10158
|
+
* Loads and checks permissions for multiple models of the same type in parallel.
|
|
10159
|
+
*
|
|
10160
|
+
* Uses {@link performAsyncTasks} internally. The `use` function receives the array of
|
|
10161
|
+
* successful {@link ContextGrantedModelRolesReader} values and an array of failed items.
|
|
10162
|
+
*
|
|
10163
|
+
* @param type - the model type to load
|
|
10164
|
+
* @param select - selection params including keys array, roles, and use function
|
|
10165
|
+
* @returns the result of the use function
|
|
10166
|
+
*
|
|
10167
|
+
* @example
|
|
10168
|
+
* ```ts
|
|
10169
|
+
* const result = await nest.useMultipleModels('storageFile', {
|
|
10170
|
+
* request,
|
|
10171
|
+
* keys: ['storageFile/abc', 'storageFile/def'],
|
|
10172
|
+
* roles: 'download',
|
|
10173
|
+
* throwOnFirstError: false,
|
|
10174
|
+
* use: (successful, failed) => ({
|
|
10175
|
+
* documents: successful.map((r) => r.document),
|
|
10176
|
+
* errors: failed
|
|
10177
|
+
* })
|
|
10178
|
+
* });
|
|
10179
|
+
* ```
|
|
10180
|
+
*/ function useMultipleModels(type, select) {
|
|
10181
|
+
return _async_to_generator(function() {
|
|
10182
|
+
var _this, context, keys, use, throwOnFirstError, useOnFirstError, taskResult, successful, errors, hasErrors;
|
|
10183
|
+
return _ts_generator(this, function(_state) {
|
|
10184
|
+
switch(_state.label){
|
|
10185
|
+
case 0:
|
|
10186
|
+
_this = this;
|
|
10187
|
+
context = this.makeModelContext(select.request, select.buildFn);
|
|
10188
|
+
keys = select.keys, use = select.use, throwOnFirstError = select.throwOnFirstError, useOnFirstError = select.useOnFirstError;
|
|
10189
|
+
return [
|
|
10190
|
+
4,
|
|
10191
|
+
performAsyncTasks(keys, function(key) {
|
|
10192
|
+
return _async_to_generator(function() {
|
|
10193
|
+
var usePromise;
|
|
10194
|
+
return _ts_generator(this, function(_state) {
|
|
10195
|
+
usePromise = useFirebaseModelsService(this.firebaseModelsService, type, {
|
|
10196
|
+
context: context,
|
|
10197
|
+
key: key,
|
|
10198
|
+
roles: select.roles,
|
|
10199
|
+
rolesSetIncludes: select.rolesSetIncludes
|
|
10200
|
+
});
|
|
10201
|
+
return [
|
|
10202
|
+
2,
|
|
10203
|
+
usePromise(function(x) {
|
|
10204
|
+
return x;
|
|
10205
|
+
})
|
|
10206
|
+
];
|
|
10207
|
+
});
|
|
10208
|
+
}).call(_this);
|
|
10209
|
+
}, {
|
|
10210
|
+
throwError: false
|
|
10211
|
+
})
|
|
10212
|
+
];
|
|
10213
|
+
case 1:
|
|
10214
|
+
taskResult = _state.sent();
|
|
10215
|
+
successful = taskResult.results.map(function(param) {
|
|
10216
|
+
var _param = _sliced_to_array(param, 2), reader = _param[1];
|
|
10217
|
+
return reader;
|
|
10218
|
+
});
|
|
10219
|
+
errors = taskResult.errors.map(function(param) {
|
|
10220
|
+
var _param = _sliced_to_array(param, 2), key = _param[0], error = _param[1];
|
|
10221
|
+
return {
|
|
10222
|
+
key: key,
|
|
10223
|
+
error: error
|
|
10224
|
+
};
|
|
10225
|
+
});
|
|
10226
|
+
hasErrors = errors.length > 0;
|
|
10227
|
+
// throwOnFirstError (default when useOnFirstError is not set): throw the first error directly
|
|
10228
|
+
if (hasErrors && (throwOnFirstError !== null && throwOnFirstError !== void 0 ? throwOnFirstError : !useOnFirstError)) {
|
|
10229
|
+
throw errors[0].error;
|
|
10230
|
+
}
|
|
10231
|
+
// useOnFirstError: call use() with empty successes and abortedEarly: true on first error
|
|
10232
|
+
if (hasErrors && useOnFirstError) {
|
|
10233
|
+
return [
|
|
10234
|
+
2,
|
|
10235
|
+
use([], {
|
|
10236
|
+
errors: errors,
|
|
10237
|
+
abortedEarly: true
|
|
10238
|
+
})
|
|
10239
|
+
];
|
|
10240
|
+
}
|
|
10241
|
+
return [
|
|
10242
|
+
2,
|
|
10243
|
+
use(successful, {
|
|
10244
|
+
errors: errors,
|
|
10245
|
+
abortedEarly: false
|
|
10246
|
+
})
|
|
10247
|
+
];
|
|
10248
|
+
}
|
|
10249
|
+
});
|
|
10250
|
+
}).call(this);
|
|
10251
|
+
}
|
|
10108
10252
|
}
|
|
10109
10253
|
]);
|
|
10110
10254
|
return AbstractFirebaseNestContext;
|