@quatrain/cloudwrapper-firebase 1.2.1 → 1.2.2
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.
|
@@ -17,6 +17,7 @@ const v2_1 = require("firebase-functions/v2");
|
|
|
17
17
|
const storage_1 = require("firebase-functions/v2/storage");
|
|
18
18
|
const cloudwrapper_1 = require("@quatrain/cloudwrapper");
|
|
19
19
|
const backend_1 = require("@quatrain/backend");
|
|
20
|
+
const DEFAULT_HTTPS_OPTIONS = { memory: '4GiB', timeoutSeconds: 500 };
|
|
20
21
|
/**
|
|
21
22
|
* Concrete implementation adapting Firebase / Google Cloud platform functions and triggers.
|
|
22
23
|
*/
|
|
@@ -36,7 +37,7 @@ class FirebaseCloudWrapper extends cloudwrapper_1.AbstractCloudWrapper {
|
|
|
36
37
|
* @param params - Resource options (memory, timeout).
|
|
37
38
|
* @returns The constructed HTTPS function.
|
|
38
39
|
*/
|
|
39
|
-
httpsTrigger(func, params =
|
|
40
|
+
httpsTrigger(func, params = DEFAULT_HTTPS_OPTIONS) {
|
|
40
41
|
this._initialize();
|
|
41
42
|
return (0, https_1.onRequest)(Object.assign({ concurrency: 500 }, params), func);
|
|
42
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quatrain/cloudwrapper-firebase",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"license": "AGPL-3.0-only",
|
|
5
5
|
"description": "Cloud Wrapper adapter for Firebase",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"author": "Quatrain Développement SAS <developers@quatrain.com>",
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@quatrain/core": "^1.2.
|
|
23
|
+
"@quatrain/core": "^1.2.13"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@quatrain/backend": "^1.2.
|
|
26
|
+
"@quatrain/backend": "^1.2.11",
|
|
27
27
|
"@quatrain/cloudwrapper": "^1.2.1",
|
|
28
|
-
"@quatrain/core": "^1.2.
|
|
28
|
+
"@quatrain/core": "^1.2.13",
|
|
29
29
|
"firebase-admin": "^13.4.0",
|
|
30
30
|
"firebase-functions": "^6.4.0"
|
|
31
31
|
},
|
|
@@ -27,6 +27,8 @@ export type FirebaseParams = {
|
|
|
27
27
|
serviceAccount?: string
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
const DEFAULT_HTTPS_OPTIONS: HttpsOptions = { memory: '4GiB', timeoutSeconds: 500 }
|
|
31
|
+
|
|
30
32
|
/**
|
|
31
33
|
* Concrete implementation adapting Firebase / Google Cloud platform functions and triggers.
|
|
32
34
|
*/
|
|
@@ -50,7 +52,7 @@ export class FirebaseCloudWrapper extends AbstractCloudWrapper {
|
|
|
50
52
|
*/
|
|
51
53
|
httpsTrigger(
|
|
52
54
|
func: any,
|
|
53
|
-
params: HttpsOptions =
|
|
55
|
+
params: HttpsOptions = DEFAULT_HTTPS_OPTIONS
|
|
54
56
|
): HttpsFunction {
|
|
55
57
|
this._initialize()
|
|
56
58
|
return onRequest(
|