@firebase-function-kits/firestore-bigquery-export 0.0.2-rc.8 → 0.1.0
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/CHANGELOG.md +0 -5
- package/LICENSE +202 -0
- package/README.md +301 -359
- package/lib/config.d.ts +9 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +44 -3
- package/lib/config.js.map +1 -1
- package/lib/events.d.ts +13 -8
- package/lib/events.d.ts.map +1 -1
- package/lib/events.js +42 -22
- package/lib/events.js.map +1 -1
- package/lib/handlers.d.ts.map +1 -1
- package/lib/handlers.js +20 -35
- package/lib/handlers.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +40 -13
- package/lib/index.js.map +1 -1
- package/lib/region.d.ts +4 -2
- package/lib/region.d.ts.map +1 -1
- package/lib/region.js +7 -4
- package/lib/region.js.map +1 -1
- package/npm-shrinkwrap.json +379 -85
- package/package.json +3 -3
- package/src/config.ts +50 -3
- package/src/events.ts +46 -25
- package/src/handlers.ts +20 -33
- package/src/index.ts +53 -14
- package/src/region.ts +7 -4
- package/tests/config-runtime.test.ts +43 -0
- package/tests/eventarc-outage.test.ts +119 -0
- package/tests/events.test.ts +87 -7
- package/tests/handlers.test.ts +0 -14
- package/tests/index.test.ts +91 -19
- package/tests/region.test.ts +18 -0
- package/tests/required-apis.test.ts +102 -11
- package/tests/required-params.test.ts +138 -0
package/lib/region.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Maps a Firestore database location to the Cloud Run region the functions
|
|
3
|
-
* should deploy to.
|
|
4
|
-
*
|
|
3
|
+
* should deploy to. The lookup is case-insensitive and ignores surrounding
|
|
4
|
+
* whitespace, as the CLI's own region handling is. Regional locations pass
|
|
5
|
+
* through lowercased; an unset or blank location returns `undefined`, meaning
|
|
6
|
+
* the functions declare no region.
|
|
5
7
|
*/
|
|
6
8
|
export declare function firestoreLocationToFunctionRegion(location: string | undefined): string | undefined;
|
|
7
9
|
//# sourceMappingURL=region.d.ts.map
|
package/lib/region.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":"AAwBA
|
|
1
|
+
{"version":3,"file":"region.d.ts","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":"AAwBA;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,SAAS,CAMpB"}
|
package/lib/region.js
CHANGED
|
@@ -25,13 +25,16 @@ const MULTI_REGION_TO_FUNCTION_REGION = {
|
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
27
|
* Maps a Firestore database location to the Cloud Run region the functions
|
|
28
|
-
* should deploy to.
|
|
29
|
-
*
|
|
28
|
+
* should deploy to. The lookup is case-insensitive and ignores surrounding
|
|
29
|
+
* whitespace, as the CLI's own region handling is. Regional locations pass
|
|
30
|
+
* through lowercased; an unset or blank location returns `undefined`, meaning
|
|
31
|
+
* the functions declare no region.
|
|
30
32
|
*/
|
|
31
33
|
function firestoreLocationToFunctionRegion(location) {
|
|
32
|
-
|
|
34
|
+
const normalized = location?.trim().toLowerCase();
|
|
35
|
+
if (!normalized) {
|
|
33
36
|
return undefined;
|
|
34
37
|
}
|
|
35
|
-
return MULTI_REGION_TO_FUNCTION_REGION[
|
|
38
|
+
return MULTI_REGION_TO_FUNCTION_REGION[normalized] ?? normalized;
|
|
36
39
|
}
|
|
37
40
|
//# sourceMappingURL=region.js.map
|
package/lib/region.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"region.js","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"region.js","sourceRoot":"","sources":["../src/region.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAiBH,8EAQC;AAvBD,0EAA0E;AAC1E,+EAA+E;AAC/E,MAAM,+BAA+B,GAA2B;IAC9D,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,iCAAiC,CAC/C,QAA4B;IAE5B,MAAM,UAAU,GAAG,QAAQ,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAClD,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,+BAA+B,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;AACnE,CAAC"}
|