@dereekb/firebase-server 13.6.9 → 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 +256 -90
- package/index.esm.js +258 -93
- 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/app.d.ts +9 -1
- package/src/lib/nest/app.module.d.ts +33 -0
- package/src/lib/nest/nest.provider.d.ts +82 -0
- package/test/package.json +10 -10
- package/zoho/package.json +9 -9
package/index.cjs.js
CHANGED
|
@@ -18,6 +18,7 @@ var admin = require('firebase-admin');
|
|
|
18
18
|
var storage = require('@google-cloud/storage');
|
|
19
19
|
var dateFns = require('date-fns');
|
|
20
20
|
var types = require('util/types');
|
|
21
|
+
var rxjs$1 = require('@dereekb/rxjs');
|
|
21
22
|
var platformExpress = require('@nestjs/platform-express');
|
|
22
23
|
var express = require('express');
|
|
23
24
|
|
|
@@ -802,16 +803,16 @@ function _is_native_reflect_construct$5() {
|
|
|
802
803
|
}
|
|
803
804
|
(makeError.BaseError);
|
|
804
805
|
|
|
805
|
-
function _array_like_to_array$
|
|
806
|
+
function _array_like_to_array$b(arr, len) {
|
|
806
807
|
if (len == null || len > arr.length) len = arr.length;
|
|
807
808
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
808
809
|
return arr2;
|
|
809
810
|
}
|
|
810
|
-
function _array_with_holes$
|
|
811
|
+
function _array_with_holes$4(arr) {
|
|
811
812
|
if (Array.isArray(arr)) return arr;
|
|
812
813
|
}
|
|
813
814
|
function _array_without_holes$7(arr) {
|
|
814
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
815
|
+
if (Array.isArray(arr)) return _array_like_to_array$b(arr);
|
|
815
816
|
}
|
|
816
817
|
function _assert_this_initialized$4(self) {
|
|
817
818
|
if (self === void 0) {
|
|
@@ -905,7 +906,7 @@ function _inherits$4(subClass, superClass) {
|
|
|
905
906
|
function _iterable_to_array$7(iter) {
|
|
906
907
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
907
908
|
}
|
|
908
|
-
function _iterable_to_array_limit$
|
|
909
|
+
function _iterable_to_array_limit$4(arr, i) {
|
|
909
910
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
910
911
|
if (_i == null) return;
|
|
911
912
|
var _arr = [];
|
|
@@ -929,7 +930,7 @@ function _iterable_to_array_limit$3(arr, i) {
|
|
|
929
930
|
}
|
|
930
931
|
return _arr;
|
|
931
932
|
}
|
|
932
|
-
function _non_iterable_rest$
|
|
933
|
+
function _non_iterable_rest$4() {
|
|
933
934
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
934
935
|
}
|
|
935
936
|
function _non_iterable_spread$7() {
|
|
@@ -963,23 +964,23 @@ function _set_prototype_of$4(o, p) {
|
|
|
963
964
|
};
|
|
964
965
|
return _set_prototype_of$4(o, p);
|
|
965
966
|
}
|
|
966
|
-
function _sliced_to_array$
|
|
967
|
-
return _array_with_holes$
|
|
967
|
+
function _sliced_to_array$4(arr, i) {
|
|
968
|
+
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$b(arr, i) || _non_iterable_rest$4();
|
|
968
969
|
}
|
|
969
970
|
function _to_consumable_array$7(arr) {
|
|
970
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$
|
|
971
|
+
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$b(arr) || _non_iterable_spread$7();
|
|
971
972
|
}
|
|
972
973
|
function _type_of$5(obj) {
|
|
973
974
|
"@swc/helpers - typeof";
|
|
974
975
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
975
976
|
}
|
|
976
|
-
function _unsupported_iterable_to_array$
|
|
977
|
+
function _unsupported_iterable_to_array$b(o, minLen) {
|
|
977
978
|
if (!o) return;
|
|
978
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
979
|
+
if (typeof o === "string") return _array_like_to_array$b(o, minLen);
|
|
979
980
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
980
981
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
981
982
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
982
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
983
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$b(o, minLen);
|
|
983
984
|
}
|
|
984
985
|
function _is_native_reflect_construct$4() {
|
|
985
986
|
try {
|
|
@@ -1335,7 +1336,7 @@ function _ts_generator$b(thisArg, body) {
|
|
|
1335
1336
|
claims = {};
|
|
1336
1337
|
util.forEachKeyValue(baseClaims, {
|
|
1337
1338
|
forEach: function forEach(param) {
|
|
1338
|
-
var _param = _sliced_to_array$
|
|
1339
|
+
var _param = _sliced_to_array$4(param, 1), key = _param[0];
|
|
1339
1340
|
claims[key] = null; // set null on every key
|
|
1340
1341
|
},
|
|
1341
1342
|
filter: util.KeyValueTypleValueFilter.NONE // don't skip any key/value
|
|
@@ -2286,13 +2287,13 @@ function _class_call_check$m(instance, Constructor) {
|
|
|
2286
2287
|
});
|
|
2287
2288
|
}
|
|
2288
2289
|
|
|
2289
|
-
function _array_like_to_array$
|
|
2290
|
+
function _array_like_to_array$a(arr, len) {
|
|
2290
2291
|
if (len == null || len > arr.length) len = arr.length;
|
|
2291
2292
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2292
2293
|
return arr2;
|
|
2293
2294
|
}
|
|
2294
2295
|
function _array_without_holes$6(arr) {
|
|
2295
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
2296
|
+
if (Array.isArray(arr)) return _array_like_to_array$a(arr);
|
|
2296
2297
|
}
|
|
2297
2298
|
function _define_property$r(obj, key, value) {
|
|
2298
2299
|
if (key in obj) {
|
|
@@ -2329,15 +2330,15 @@ function _object_spread$f(target) {
|
|
|
2329
2330
|
return target;
|
|
2330
2331
|
}
|
|
2331
2332
|
function _to_consumable_array$6(arr) {
|
|
2332
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$
|
|
2333
|
+
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$6();
|
|
2333
2334
|
}
|
|
2334
|
-
function _unsupported_iterable_to_array$
|
|
2335
|
+
function _unsupported_iterable_to_array$a(o, minLen) {
|
|
2335
2336
|
if (!o) return;
|
|
2336
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2337
|
+
if (typeof o === "string") return _array_like_to_array$a(o, minLen);
|
|
2337
2338
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2338
2339
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2339
2340
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2340
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2341
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
|
|
2341
2342
|
}
|
|
2342
2343
|
/**
|
|
2343
2344
|
* Converts a {@link FirestoreAccessorArrayUpdate} into Firestore {@link UpdateData} using
|
|
@@ -2896,12 +2897,12 @@ function _define_property$o(obj, key, value) {
|
|
|
2896
2897
|
return new TransactionFirestoreDocumentContext(transaction);
|
|
2897
2898
|
}
|
|
2898
2899
|
|
|
2899
|
-
function _array_like_to_array$
|
|
2900
|
+
function _array_like_to_array$9(arr, len) {
|
|
2900
2901
|
if (len == null || len > arr.length) len = arr.length;
|
|
2901
2902
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2902
2903
|
return arr2;
|
|
2903
2904
|
}
|
|
2904
|
-
function _array_with_holes$
|
|
2905
|
+
function _array_with_holes$3(arr) {
|
|
2905
2906
|
if (Array.isArray(arr)) return arr;
|
|
2906
2907
|
}
|
|
2907
2908
|
function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -2933,7 +2934,7 @@ function _async_to_generator$a(fn) {
|
|
|
2933
2934
|
});
|
|
2934
2935
|
};
|
|
2935
2936
|
}
|
|
2936
|
-
function _iterable_to_array_limit$
|
|
2937
|
+
function _iterable_to_array_limit$3(arr, i) {
|
|
2937
2938
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2938
2939
|
if (_i == null) return;
|
|
2939
2940
|
var _arr = [];
|
|
@@ -2957,19 +2958,19 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
2957
2958
|
}
|
|
2958
2959
|
return _arr;
|
|
2959
2960
|
}
|
|
2960
|
-
function _non_iterable_rest$
|
|
2961
|
+
function _non_iterable_rest$3() {
|
|
2961
2962
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2962
2963
|
}
|
|
2963
|
-
function _sliced_to_array$
|
|
2964
|
-
return _array_with_holes$
|
|
2964
|
+
function _sliced_to_array$3(arr, i) {
|
|
2965
|
+
return _array_with_holes$3(arr) || _iterable_to_array_limit$3(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$3();
|
|
2965
2966
|
}
|
|
2966
|
-
function _unsupported_iterable_to_array$
|
|
2967
|
+
function _unsupported_iterable_to_array$9(o, minLen) {
|
|
2967
2968
|
if (!o) return;
|
|
2968
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
2969
|
+
if (typeof o === "string") return _array_like_to_array$9(o, minLen);
|
|
2969
2970
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2970
2971
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2971
2972
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2972
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
2973
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
|
|
2973
2974
|
}
|
|
2974
2975
|
function _ts_generator$a(thisArg, body) {
|
|
2975
2976
|
var f, y, t, _ = {
|
|
@@ -3094,7 +3095,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
3094
3095
|
}
|
|
3095
3096
|
var batches = util.batch(pathSegments, 2); // batch to tuple [string, string]
|
|
3096
3097
|
batches.forEach(function(x) {
|
|
3097
|
-
var _x = _sliced_to_array$
|
|
3098
|
+
var _x = _sliced_to_array$3(x, 2), first = _x[0], second = _x[1];
|
|
3098
3099
|
ref = ref.doc(first).collection(second);
|
|
3099
3100
|
});
|
|
3100
3101
|
}
|
|
@@ -3121,7 +3122,7 @@ function _ts_generator$a(thisArg, body) {
|
|
|
3121
3122
|
if (pathSegments === null || pathSegments === void 0 ? void 0 : pathSegments.length) {
|
|
3122
3123
|
var batches = util.batch(pathSegments, 2); // batch to tuple [string, string]
|
|
3123
3124
|
batches.forEach(function(x) {
|
|
3124
|
-
var _x = _sliced_to_array$
|
|
3125
|
+
var _x = _sliced_to_array$3(x, 2), first = _x[0], second = _x[1];
|
|
3125
3126
|
var collection = doc.collection(first);
|
|
3126
3127
|
doc = second ? collection.doc(second) : collection.doc();
|
|
3127
3128
|
});
|
|
@@ -3189,13 +3190,13 @@ function _ts_generator$a(thisArg, body) {
|
|
|
3189
3190
|
};
|
|
3190
3191
|
}
|
|
3191
3192
|
|
|
3192
|
-
function _array_like_to_array$
|
|
3193
|
+
function _array_like_to_array$8(arr, len) {
|
|
3193
3194
|
if (len == null || len > arr.length) len = arr.length;
|
|
3194
3195
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3195
3196
|
return arr2;
|
|
3196
3197
|
}
|
|
3197
3198
|
function _array_without_holes$5(arr) {
|
|
3198
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
3199
|
+
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
3199
3200
|
}
|
|
3200
3201
|
function _define_property$n(obj, key, value) {
|
|
3201
3202
|
if (key in obj) {
|
|
@@ -3251,15 +3252,15 @@ function _object_spread_props$c(target, source) {
|
|
|
3251
3252
|
return target;
|
|
3252
3253
|
}
|
|
3253
3254
|
function _to_consumable_array$5(arr) {
|
|
3254
|
-
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$
|
|
3255
|
+
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$5();
|
|
3255
3256
|
}
|
|
3256
|
-
function _unsupported_iterable_to_array$
|
|
3257
|
+
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
3257
3258
|
if (!o) return;
|
|
3258
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
3259
|
+
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
3259
3260
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3260
3261
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3261
3262
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3262
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
3263
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
3263
3264
|
}
|
|
3264
3265
|
var _builder, _builder1;
|
|
3265
3266
|
var _obj;
|
|
@@ -4235,15 +4236,15 @@ function _ts_generator$8(thisArg, body) {
|
|
|
4235
4236
|
})();
|
|
4236
4237
|
}
|
|
4237
4238
|
|
|
4238
|
-
function _array_like_to_array$
|
|
4239
|
+
function _array_like_to_array$7(arr, len) {
|
|
4239
4240
|
if (len == null || len > arr.length) len = arr.length;
|
|
4240
4241
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
4241
4242
|
return arr2;
|
|
4242
4243
|
}
|
|
4243
|
-
function _array_with_holes$
|
|
4244
|
+
function _array_with_holes$2(arr) {
|
|
4244
4245
|
if (Array.isArray(arr)) return arr;
|
|
4245
4246
|
}
|
|
4246
|
-
function _iterable_to_array_limit$
|
|
4247
|
+
function _iterable_to_array_limit$2(arr, i) {
|
|
4247
4248
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
4248
4249
|
if (_i == null) return;
|
|
4249
4250
|
var _arr = [];
|
|
@@ -4267,7 +4268,7 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
4267
4268
|
}
|
|
4268
4269
|
return _arr;
|
|
4269
4270
|
}
|
|
4270
|
-
function _non_iterable_rest$
|
|
4271
|
+
function _non_iterable_rest$2() {
|
|
4271
4272
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4272
4273
|
}
|
|
4273
4274
|
function _object_without_properties(source, excluded) {
|
|
@@ -4306,16 +4307,16 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
4306
4307
|
}
|
|
4307
4308
|
return target;
|
|
4308
4309
|
}
|
|
4309
|
-
function _sliced_to_array$
|
|
4310
|
-
return _array_with_holes$
|
|
4310
|
+
function _sliced_to_array$2(arr, i) {
|
|
4311
|
+
return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$7(arr, i) || _non_iterable_rest$2();
|
|
4311
4312
|
}
|
|
4312
|
-
function _unsupported_iterable_to_array$
|
|
4313
|
+
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
4313
4314
|
if (!o) return;
|
|
4314
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
4315
|
+
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
4315
4316
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
4316
4317
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
4317
4318
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
4318
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
4319
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
4319
4320
|
}
|
|
4320
4321
|
// MARK: Type Guards
|
|
4321
4322
|
/**
|
|
@@ -4416,7 +4417,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4416
4417
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4417
4418
|
try {
|
|
4418
4419
|
for(var _iterator = Object.entries(config)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4419
|
-
var _step_value = _sliced_to_array$
|
|
4420
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), key = _step_value[0], handler = _step_value[1];
|
|
4420
4421
|
var details = readApiDetails(handler);
|
|
4421
4422
|
if (details != null) {
|
|
4422
4423
|
// At the specifier level, details should be handler-level (OnCallModelFunctionApiDetails)
|
|
@@ -4456,7 +4457,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4456
4457
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4457
4458
|
try {
|
|
4458
4459
|
for(var _iterator = Object.entries(map)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4459
|
-
var _step_value = _sliced_to_array$
|
|
4460
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), key = _step_value[0], handler = _step_value[1];
|
|
4460
4461
|
var details = readApiDetails(handler);
|
|
4461
4462
|
if (details != null) {
|
|
4462
4463
|
if (isOnCallModelTypeApiDetails(details)) {
|
|
@@ -4505,7 +4506,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4505
4506
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
4506
4507
|
try {
|
|
4507
4508
|
for(var _iterator = Object.entries(map)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4508
|
-
var _step_value = _sliced_to_array$
|
|
4509
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), call = _step_value[0], handler = _step_value[1];
|
|
4509
4510
|
var details = readApiDetails(handler);
|
|
4510
4511
|
if (details != null) {
|
|
4511
4512
|
result[call] = details;
|
|
@@ -4554,14 +4555,14 @@ function _unsupported_iterable_to_array$6(o, minLen) {
|
|
|
4554
4555
|
try {
|
|
4555
4556
|
// Pivot: iterate CRUD types, then model types within each
|
|
4556
4557
|
for(var _iterator = Object.entries(topDetails)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
4557
|
-
var _step_value = _sliced_to_array$
|
|
4558
|
+
var _step_value = _sliced_to_array$2(_step.value, 2), callType = _step_value[0], crudDetails = _step_value[1];
|
|
4558
4559
|
if (crudDetails == null) {
|
|
4559
4560
|
continue;
|
|
4560
4561
|
}
|
|
4561
4562
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
4562
4563
|
try {
|
|
4563
4564
|
for(var _iterator1 = Object.entries(crudDetails.modelTypes)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
4564
|
-
var _step_value1 = _sliced_to_array$
|
|
4565
|
+
var _step_value1 = _sliced_to_array$2(_step1.value, 2), modelType = _step_value1[0], modelDetails = _step_value1[1];
|
|
4565
4566
|
if (modelDetails == null) {
|
|
4566
4567
|
continue;
|
|
4567
4568
|
}
|
|
@@ -5179,13 +5180,13 @@ function _object_spread_props$b(target, source) {
|
|
|
5179
5180
|
}));
|
|
5180
5181
|
}
|
|
5181
5182
|
|
|
5182
|
-
function _array_like_to_array$
|
|
5183
|
+
function _array_like_to_array$6(arr, len) {
|
|
5183
5184
|
if (len == null || len > arr.length) len = arr.length;
|
|
5184
5185
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5185
5186
|
return arr2;
|
|
5186
5187
|
}
|
|
5187
5188
|
function _array_without_holes$4(arr) {
|
|
5188
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
5189
|
+
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
5189
5190
|
}
|
|
5190
5191
|
function _iterable_to_array$4(iter) {
|
|
5191
5192
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
@@ -5194,15 +5195,15 @@ function _non_iterable_spread$4() {
|
|
|
5194
5195
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5195
5196
|
}
|
|
5196
5197
|
function _to_consumable_array$4(arr) {
|
|
5197
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$
|
|
5198
|
+
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$4();
|
|
5198
5199
|
}
|
|
5199
|
-
function _unsupported_iterable_to_array$
|
|
5200
|
+
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
5200
5201
|
if (!o) return;
|
|
5201
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5202
|
+
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
5202
5203
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5203
5204
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5204
5205
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5205
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5206
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
5206
5207
|
}
|
|
5207
5208
|
/**
|
|
5208
5209
|
* Generates NestJS {@link ModuleMetadata} for an app's analytics module.
|
|
@@ -5892,12 +5893,12 @@ function _object_spread_props$8(target, source) {
|
|
|
5892
5893
|
});
|
|
5893
5894
|
}
|
|
5894
5895
|
|
|
5895
|
-
function _array_like_to_array$
|
|
5896
|
+
function _array_like_to_array$5(arr, len) {
|
|
5896
5897
|
if (len == null || len > arr.length) len = arr.length;
|
|
5897
5898
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
5898
5899
|
return arr2;
|
|
5899
5900
|
}
|
|
5900
|
-
function _array_with_holes(arr) {
|
|
5901
|
+
function _array_with_holes$1(arr) {
|
|
5901
5902
|
if (Array.isArray(arr)) return arr;
|
|
5902
5903
|
}
|
|
5903
5904
|
function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -5929,7 +5930,7 @@ function _async_to_generator$7(fn) {
|
|
|
5929
5930
|
});
|
|
5930
5931
|
};
|
|
5931
5932
|
}
|
|
5932
|
-
function _iterable_to_array_limit(arr, i) {
|
|
5933
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
5933
5934
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5934
5935
|
if (_i == null) return;
|
|
5935
5936
|
var _arr = [];
|
|
@@ -5953,19 +5954,19 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
5953
5954
|
}
|
|
5954
5955
|
return _arr;
|
|
5955
5956
|
}
|
|
5956
|
-
function _non_iterable_rest() {
|
|
5957
|
+
function _non_iterable_rest$1() {
|
|
5957
5958
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5958
5959
|
}
|
|
5959
|
-
function _sliced_to_array(arr, i) {
|
|
5960
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$
|
|
5960
|
+
function _sliced_to_array$1(arr, i) {
|
|
5961
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$5(arr, i) || _non_iterable_rest$1();
|
|
5961
5962
|
}
|
|
5962
|
-
function _unsupported_iterable_to_array$
|
|
5963
|
+
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
5963
5964
|
if (!o) return;
|
|
5964
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
5965
|
+
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
5965
5966
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
5966
5967
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
5967
5968
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
5968
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
5969
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
5969
5970
|
}
|
|
5970
5971
|
function _ts_generator$7(thisArg, body) {
|
|
5971
5972
|
var f, y, t, _ = {
|
|
@@ -6096,7 +6097,7 @@ function _ts_generator$7(thisArg, body) {
|
|
|
6096
6097
|
var result = [];
|
|
6097
6098
|
util.forEachKeyValue(allScheduledFunctions, {
|
|
6098
6099
|
forEach: function forEach(x) {
|
|
6099
|
-
var _x = _sliced_to_array(x, 1), functionName = _x[0];
|
|
6100
|
+
var _x = _sliced_to_array$1(x, 1), functionName = _x[0];
|
|
6100
6101
|
result.push({
|
|
6101
6102
|
name: functionName.toString()
|
|
6102
6103
|
});
|
|
@@ -6572,13 +6573,13 @@ exports.DefaultFirebaseServerEnvService = __decorate([
|
|
|
6572
6573
|
};
|
|
6573
6574
|
}
|
|
6574
6575
|
|
|
6575
|
-
function _array_like_to_array$
|
|
6576
|
+
function _array_like_to_array$4(arr, len) {
|
|
6576
6577
|
if (len == null || len > arr.length) len = arr.length;
|
|
6577
6578
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
6578
6579
|
return arr2;
|
|
6579
6580
|
}
|
|
6580
6581
|
function _array_without_holes$3(arr) {
|
|
6581
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
6582
|
+
if (Array.isArray(arr)) return _array_like_to_array$4(arr);
|
|
6582
6583
|
}
|
|
6583
6584
|
function _class_call_check$b(instance, Constructor) {
|
|
6584
6585
|
if (!(instance instanceof Constructor)) {
|
|
@@ -6592,15 +6593,15 @@ function _non_iterable_spread$3() {
|
|
|
6592
6593
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6593
6594
|
}
|
|
6594
6595
|
function _to_consumable_array$3(arr) {
|
|
6595
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$
|
|
6596
|
+
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
|
|
6596
6597
|
}
|
|
6597
|
-
function _unsupported_iterable_to_array$
|
|
6598
|
+
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
6598
6599
|
if (!o) return;
|
|
6599
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
6600
|
+
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
6600
6601
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
6601
6602
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
6602
6603
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
6603
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
6604
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
6604
6605
|
}
|
|
6605
6606
|
// MARK: Tokens
|
|
6606
6607
|
/**
|
|
@@ -7930,13 +7931,13 @@ exports.FirebaseAppCheckMiddleware = __decorate([
|
|
|
7930
7931
|
})();
|
|
7931
7932
|
}
|
|
7932
7933
|
|
|
7933
|
-
function _array_like_to_array$
|
|
7934
|
+
function _array_like_to_array$3(arr, len) {
|
|
7934
7935
|
if (len == null || len > arr.length) len = arr.length;
|
|
7935
7936
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
7936
7937
|
return arr2;
|
|
7937
7938
|
}
|
|
7938
7939
|
function _array_without_holes$2(arr) {
|
|
7939
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
7940
|
+
if (Array.isArray(arr)) return _array_like_to_array$3(arr);
|
|
7940
7941
|
}
|
|
7941
7942
|
function _class_call_check$7(instance, Constructor) {
|
|
7942
7943
|
if (!(instance instanceof Constructor)) {
|
|
@@ -7976,15 +7977,15 @@ function _non_iterable_spread$2() {
|
|
|
7976
7977
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
7977
7978
|
}
|
|
7978
7979
|
function _to_consumable_array$2(arr) {
|
|
7979
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$
|
|
7980
|
+
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread$2();
|
|
7980
7981
|
}
|
|
7981
|
-
function _unsupported_iterable_to_array$
|
|
7982
|
+
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
7982
7983
|
if (!o) return;
|
|
7983
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
7984
|
+
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
7984
7985
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
7985
7986
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
7986
7987
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
7987
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
7988
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
7988
7989
|
}
|
|
7989
7990
|
/**
|
|
7990
7991
|
* Middleware module that configures `FirebaseAppCheckMiddleware` route coverage
|
|
@@ -9104,13 +9105,13 @@ function _define_property$4(obj, key, value) {
|
|
|
9104
9105
|
return storage.storageClient;
|
|
9105
9106
|
}
|
|
9106
9107
|
|
|
9107
|
-
function _array_like_to_array$
|
|
9108
|
+
function _array_like_to_array$2(arr, len) {
|
|
9108
9109
|
if (len == null || len > arr.length) len = arr.length;
|
|
9109
9110
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9110
9111
|
return arr2;
|
|
9111
9112
|
}
|
|
9112
9113
|
function _array_without_holes$1(arr) {
|
|
9113
|
-
if (Array.isArray(arr)) return _array_like_to_array$
|
|
9114
|
+
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
9114
9115
|
}
|
|
9115
9116
|
function _class_call_check$3(instance, Constructor) {
|
|
9116
9117
|
if (!(instance instanceof Constructor)) {
|
|
@@ -9171,15 +9172,15 @@ function _object_spread_props$1(target, source) {
|
|
|
9171
9172
|
return target;
|
|
9172
9173
|
}
|
|
9173
9174
|
function _to_consumable_array$1(arr) {
|
|
9174
|
-
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$
|
|
9175
|
+
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$1();
|
|
9175
9176
|
}
|
|
9176
|
-
function _unsupported_iterable_to_array$
|
|
9177
|
+
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
9177
9178
|
if (!o) return;
|
|
9178
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
9179
|
+
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
9179
9180
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9180
9181
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9181
9182
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9182
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
9183
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
9183
9184
|
}
|
|
9184
9185
|
// MARK: Tokens
|
|
9185
9186
|
/**
|
|
@@ -9329,13 +9330,13 @@ exports.FirebaseServerStorageContextModule = __decorate([
|
|
|
9329
9330
|
}, config);
|
|
9330
9331
|
}
|
|
9331
9332
|
|
|
9332
|
-
function _array_like_to_array(arr, len) {
|
|
9333
|
+
function _array_like_to_array$1(arr, len) {
|
|
9333
9334
|
if (len == null || len > arr.length) len = arr.length;
|
|
9334
9335
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9335
9336
|
return arr2;
|
|
9336
9337
|
}
|
|
9337
9338
|
function _array_without_holes(arr) {
|
|
9338
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
9339
|
+
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
9339
9340
|
}
|
|
9340
9341
|
function _class_call_check$2(instance, Constructor) {
|
|
9341
9342
|
if (!(instance instanceof Constructor)) {
|
|
@@ -9396,16 +9397,20 @@ function _object_spread_props(target, source) {
|
|
|
9396
9397
|
return target;
|
|
9397
9398
|
}
|
|
9398
9399
|
function _to_consumable_array(arr) {
|
|
9399
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
9400
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread();
|
|
9400
9401
|
}
|
|
9401
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
9402
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
9402
9403
|
if (!o) return;
|
|
9403
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
9404
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
9404
9405
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9405
9406
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9406
9407
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9407
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
9408
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
9408
9409
|
}
|
|
9410
|
+
// MARK: Assets
|
|
9411
|
+
/**
|
|
9412
|
+
* Default base path for local assets on the server filesystem.
|
|
9413
|
+
*/ var DEFAULT_SERVER_ASSETS_BASE_PATH = './assets';
|
|
9409
9414
|
// MARK: Root Module
|
|
9410
9415
|
var FirebaseNestServerRootModule = function FirebaseNestServerRootModule() {
|
|
9411
9416
|
_class_call_check$2(this, FirebaseNestServerRootModule);
|
|
@@ -9425,6 +9430,7 @@ var FirebaseNestServerRootModule = function FirebaseNestServerRootModule() {
|
|
|
9425
9430
|
* @param config - Shared configuration
|
|
9426
9431
|
* @returns The root module and resolved prefix config
|
|
9427
9432
|
*/ function buildNestServerRootModule(config) {
|
|
9433
|
+
var _ref, _ref1;
|
|
9428
9434
|
var providers = [];
|
|
9429
9435
|
var imports = _to_consumable_array(util.asArray(config.modules));
|
|
9430
9436
|
// Firebase app token
|
|
@@ -9493,6 +9499,20 @@ var FirebaseNestServerRootModule = function FirebaseNestServerRootModule() {
|
|
|
9493
9499
|
provide: GlobalRoutePrefixConfig,
|
|
9494
9500
|
useValue: globalApiRoutePrefixConfig !== null && globalApiRoutePrefixConfig !== void 0 ? globalApiRoutePrefixConfig : {}
|
|
9495
9501
|
});
|
|
9502
|
+
// Assets — always provide AssetLoader globally
|
|
9503
|
+
var assetConfig = config.assets;
|
|
9504
|
+
var local = (_ref = assetConfig === null || assetConfig === void 0 ? void 0 : assetConfig.local) !== null && _ref !== void 0 ? _ref : nestjs.nodeJsLocalAssetLoader({
|
|
9505
|
+
basePath: DEFAULT_SERVER_ASSETS_BASE_PATH
|
|
9506
|
+
});
|
|
9507
|
+
var remote = (_ref1 = assetConfig === null || assetConfig === void 0 ? void 0 : assetConfig.remote) !== null && _ref1 !== void 0 ? _ref1 : rxjs$1.fetchAssetLoader();
|
|
9508
|
+
var loader = rxjs$1.delegatedAssetLoader({
|
|
9509
|
+
local: local,
|
|
9510
|
+
remote: remote
|
|
9511
|
+
});
|
|
9512
|
+
providers.push({
|
|
9513
|
+
provide: rxjs$1.AssetLoader,
|
|
9514
|
+
useValue: loader
|
|
9515
|
+
});
|
|
9496
9516
|
var rootModule = {
|
|
9497
9517
|
module: FirebaseNestServerRootModule,
|
|
9498
9518
|
imports: imports,
|
|
@@ -9673,7 +9693,8 @@ function _ts_generator$1(thisArg, body) {
|
|
|
9673
9693
|
forceStorageBucket: config.forceStorageBucket,
|
|
9674
9694
|
globalApiRoutePrefix: config.globalApiRoutePrefix,
|
|
9675
9695
|
configureWebhooks: config.configureWebhooks,
|
|
9676
|
-
appCheckEnabled: config.appCheckEnabled !== false
|
|
9696
|
+
appCheckEnabled: config.appCheckEnabled !== false,
|
|
9697
|
+
assets: config.assets
|
|
9677
9698
|
}), rootModule = _buildNestServerRootModule.rootModule, globalApiRoutePrefixConfig = _buildNestServerRootModule.globalApiRoutePrefixConfig;
|
|
9678
9699
|
// NOTE: https://cloud.google.com/functions/docs/writing/http#parsing_http_requests
|
|
9679
9700
|
options = {
|
|
@@ -9744,6 +9765,14 @@ function _ts_generator$1(thisArg, body) {
|
|
|
9744
9765
|
};
|
|
9745
9766
|
}
|
|
9746
9767
|
|
|
9768
|
+
function _array_like_to_array(arr, len) {
|
|
9769
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9770
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
9771
|
+
return arr2;
|
|
9772
|
+
}
|
|
9773
|
+
function _array_with_holes(arr) {
|
|
9774
|
+
if (Array.isArray(arr)) return arr;
|
|
9775
|
+
}
|
|
9747
9776
|
function _assert_this_initialized(self) {
|
|
9748
9777
|
if (self === void 0) {
|
|
9749
9778
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
@@ -9833,6 +9862,33 @@ function _inherits(subClass, superClass) {
|
|
|
9833
9862
|
});
|
|
9834
9863
|
if (superClass) _set_prototype_of(subClass, superClass);
|
|
9835
9864
|
}
|
|
9865
|
+
function _iterable_to_array_limit(arr, i) {
|
|
9866
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
9867
|
+
if (_i == null) return;
|
|
9868
|
+
var _arr = [];
|
|
9869
|
+
var _n = true;
|
|
9870
|
+
var _d = false;
|
|
9871
|
+
var _s, _e;
|
|
9872
|
+
try {
|
|
9873
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
9874
|
+
_arr.push(_s.value);
|
|
9875
|
+
if (i && _arr.length === i) break;
|
|
9876
|
+
}
|
|
9877
|
+
} catch (err) {
|
|
9878
|
+
_d = true;
|
|
9879
|
+
_e = err;
|
|
9880
|
+
} finally{
|
|
9881
|
+
try {
|
|
9882
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
9883
|
+
} finally{
|
|
9884
|
+
if (_d) throw _e;
|
|
9885
|
+
}
|
|
9886
|
+
}
|
|
9887
|
+
return _arr;
|
|
9888
|
+
}
|
|
9889
|
+
function _non_iterable_rest() {
|
|
9890
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9891
|
+
}
|
|
9836
9892
|
function _possible_constructor_return(self, call) {
|
|
9837
9893
|
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
9838
9894
|
return call;
|
|
@@ -9846,10 +9902,21 @@ function _set_prototype_of(o, p) {
|
|
|
9846
9902
|
};
|
|
9847
9903
|
return _set_prototype_of(o, p);
|
|
9848
9904
|
}
|
|
9905
|
+
function _sliced_to_array(arr, i) {
|
|
9906
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
9907
|
+
}
|
|
9849
9908
|
function _type_of(obj) {
|
|
9850
9909
|
"@swc/helpers - typeof";
|
|
9851
9910
|
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
9852
9911
|
}
|
|
9912
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
9913
|
+
if (!o) return;
|
|
9914
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
9915
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
9916
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
9917
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
9918
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
9919
|
+
}
|
|
9853
9920
|
function _is_native_reflect_construct() {
|
|
9854
9921
|
try {
|
|
9855
9922
|
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
@@ -10086,6 +10153,104 @@ function _ts_generator(thisArg, body) {
|
|
|
10086
10153
|
});
|
|
10087
10154
|
}).call(this);
|
|
10088
10155
|
}
|
|
10156
|
+
},
|
|
10157
|
+
{
|
|
10158
|
+
key: "useMultipleModels",
|
|
10159
|
+
value: /**
|
|
10160
|
+
* Loads and checks permissions for multiple models of the same type in parallel.
|
|
10161
|
+
*
|
|
10162
|
+
* Uses {@link performAsyncTasks} internally. The `use` function receives the array of
|
|
10163
|
+
* successful {@link ContextGrantedModelRolesReader} values and an array of failed items.
|
|
10164
|
+
*
|
|
10165
|
+
* @param type - the model type to load
|
|
10166
|
+
* @param select - selection params including keys array, roles, and use function
|
|
10167
|
+
* @returns the result of the use function
|
|
10168
|
+
*
|
|
10169
|
+
* @example
|
|
10170
|
+
* ```ts
|
|
10171
|
+
* const result = await nest.useMultipleModels('storageFile', {
|
|
10172
|
+
* request,
|
|
10173
|
+
* keys: ['storageFile/abc', 'storageFile/def'],
|
|
10174
|
+
* roles: 'download',
|
|
10175
|
+
* throwOnFirstError: false,
|
|
10176
|
+
* use: (successful, failed) => ({
|
|
10177
|
+
* documents: successful.map((r) => r.document),
|
|
10178
|
+
* errors: failed
|
|
10179
|
+
* })
|
|
10180
|
+
* });
|
|
10181
|
+
* ```
|
|
10182
|
+
*/ function useMultipleModels(type, select) {
|
|
10183
|
+
return _async_to_generator(function() {
|
|
10184
|
+
var _this, context, keys, use, throwOnFirstError, useOnFirstError, taskResult, successful, errors, hasErrors;
|
|
10185
|
+
return _ts_generator(this, function(_state) {
|
|
10186
|
+
switch(_state.label){
|
|
10187
|
+
case 0:
|
|
10188
|
+
_this = this;
|
|
10189
|
+
context = this.makeModelContext(select.request, select.buildFn);
|
|
10190
|
+
keys = select.keys, use = select.use, throwOnFirstError = select.throwOnFirstError, useOnFirstError = select.useOnFirstError;
|
|
10191
|
+
return [
|
|
10192
|
+
4,
|
|
10193
|
+
util.performAsyncTasks(keys, function(key) {
|
|
10194
|
+
return _async_to_generator(function() {
|
|
10195
|
+
var usePromise;
|
|
10196
|
+
return _ts_generator(this, function(_state) {
|
|
10197
|
+
usePromise = firebase.useFirebaseModelsService(this.firebaseModelsService, type, {
|
|
10198
|
+
context: context,
|
|
10199
|
+
key: key,
|
|
10200
|
+
roles: select.roles,
|
|
10201
|
+
rolesSetIncludes: select.rolesSetIncludes
|
|
10202
|
+
});
|
|
10203
|
+
return [
|
|
10204
|
+
2,
|
|
10205
|
+
usePromise(function(x) {
|
|
10206
|
+
return x;
|
|
10207
|
+
})
|
|
10208
|
+
];
|
|
10209
|
+
});
|
|
10210
|
+
}).call(_this);
|
|
10211
|
+
}, {
|
|
10212
|
+
throwError: false
|
|
10213
|
+
})
|
|
10214
|
+
];
|
|
10215
|
+
case 1:
|
|
10216
|
+
taskResult = _state.sent();
|
|
10217
|
+
successful = taskResult.results.map(function(param) {
|
|
10218
|
+
var _param = _sliced_to_array(param, 2), reader = _param[1];
|
|
10219
|
+
return reader;
|
|
10220
|
+
});
|
|
10221
|
+
errors = taskResult.errors.map(function(param) {
|
|
10222
|
+
var _param = _sliced_to_array(param, 2), key = _param[0], error = _param[1];
|
|
10223
|
+
return {
|
|
10224
|
+
key: key,
|
|
10225
|
+
error: error
|
|
10226
|
+
};
|
|
10227
|
+
});
|
|
10228
|
+
hasErrors = errors.length > 0;
|
|
10229
|
+
// throwOnFirstError (default when useOnFirstError is not set): throw the first error directly
|
|
10230
|
+
if (hasErrors && (throwOnFirstError !== null && throwOnFirstError !== void 0 ? throwOnFirstError : !useOnFirstError)) {
|
|
10231
|
+
throw errors[0].error;
|
|
10232
|
+
}
|
|
10233
|
+
// useOnFirstError: call use() with empty successes and abortedEarly: true on first error
|
|
10234
|
+
if (hasErrors && useOnFirstError) {
|
|
10235
|
+
return [
|
|
10236
|
+
2,
|
|
10237
|
+
use([], {
|
|
10238
|
+
errors: errors,
|
|
10239
|
+
abortedEarly: true
|
|
10240
|
+
})
|
|
10241
|
+
];
|
|
10242
|
+
}
|
|
10243
|
+
return [
|
|
10244
|
+
2,
|
|
10245
|
+
use(successful, {
|
|
10246
|
+
errors: errors,
|
|
10247
|
+
abortedEarly: false
|
|
10248
|
+
})
|
|
10249
|
+
];
|
|
10250
|
+
}
|
|
10251
|
+
});
|
|
10252
|
+
}).call(this);
|
|
10253
|
+
}
|
|
10089
10254
|
}
|
|
10090
10255
|
]);
|
|
10091
10256
|
return AbstractFirebaseNestContext;
|
|
@@ -10163,6 +10328,7 @@ exports.AbstractServerFirebaseNestContext = AbstractServerFirebaseNestContext;
|
|
|
10163
10328
|
exports.BAD_REQUEST_ERROR_CODE = BAD_REQUEST_ERROR_CODE;
|
|
10164
10329
|
exports.CONFLICT_ERROR_CODE = CONFLICT_ERROR_CODE;
|
|
10165
10330
|
exports.DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR = DEFAULT_FIREBASE_PASSWORD_NUMBER_GENERATOR;
|
|
10331
|
+
exports.DEFAULT_SERVER_ASSETS_BASE_PATH = DEFAULT_SERVER_ASSETS_BASE_PATH;
|
|
10166
10332
|
exports.DEFAULT_SETUP_COM_THROTTLE_TIME = DEFAULT_SETUP_COM_THROTTLE_TIME;
|
|
10167
10333
|
exports.FIREBASE_APP_TOKEN = FIREBASE_APP_TOKEN;
|
|
10168
10334
|
exports.FIREBASE_AUTH_TOKEN = FIREBASE_AUTH_TOKEN;
|